/**
 * Shenango Valley — Nature local atlas
 * Valley greens / river slate palette.
 * Development work by David Lane
 */

.sv-page {
  --sv-green: #2f5d46;
  --sv-green-deep: #1e3d2e;
  --sv-mist: #e8f0ea;
  --sv-mist-soft: #f4f8f5;
  --sv-line: #c5d4ca;
  --sv-slate: #3a4a52;
  --sv-amber: #c48a3a;
  --sv-ink: #1a2420;
  --sv-muted: #5a6b62;
  --sv-panel: #1a2420;
  --sv-panel-ink: #f4f8f5;

  background: var(--sv-mist-soft);
  color: var(--sv-ink);
  font-family: 'Source Sans 3', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

.sv-main {
  padding-bottom: 3rem;
}

.sv-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(1.5rem, 4vw, 2.75rem) 0 clamp(1.25rem, 3vw, 2rem);
  background:
    radial-gradient(ellipse at 15% 10%, rgba(47, 93, 70, 0.22), transparent 55%),
    radial-gradient(ellipse at 85% 0%, rgba(196, 138, 58, 0.18), transparent 50%),
    linear-gradient(165deg, #eef5f0 0%, #d5e4da 50%, #c2d4c8 100%);
  border-bottom: 1px solid var(--sv-line);
}

.sv-hero-atmos {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.sv-hero-mist {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 40% at 70% 20%, rgba(255, 255, 255, 0.35), transparent 60%),
    linear-gradient(180deg, transparent 40%, rgba(47, 93, 70, 0.08) 100%);
  animation: sv-mist-breathe 16s ease-in-out infinite;
}

.sv-hero-ridge {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  width: 100%;
  height: min(38%, 220px);
  opacity: 0.18;
  color: var(--sv-green-deep);
  fill: currentColor;
  animation: sv-ridge-drift 22s ease-in-out infinite;
}

@keyframes sv-mist-breathe {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}

@keyframes sv-ridge-drift {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(-1.5%); }
}

.sv-hero-layout {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 1.5rem;
  align-items: end;
}

@media (min-width: 900px) {
  .sv-hero-layout {
    grid-template-columns: 1fr minmax(240px, 300px);
    gap: 2rem;
  }
}

.sv-kicker {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sv-green);
  margin-bottom: 0.5rem;
}

.sv-hero-title {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  font-size: clamp(2.6rem, 7vw, 4.2rem);
  line-height: 1.05;
  color: var(--sv-green-deep);
  margin: 0 0 0.75rem;
}

.sv-hero-line {
  font-size: 1.1rem;
  max-width: 36rem;
  color: var(--sv-slate);
  margin-bottom: 1.25rem;
}

.sv-hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.sv-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  padding: 0.55rem 1rem;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  cursor: pointer;
  background: transparent;
  color: inherit;
}

.sv-btn-primary {
  background: var(--sv-green);
  color: #fff;
}

.sv-btn-primary:hover {
  background: var(--sv-green-deep);
  color: #fff;
}

.sv-btn-sand {
  background: rgba(255, 255, 255, 0.7);
  border-color: var(--sv-line);
  color: var(--sv-green-deep);
}

.sv-btn-ghost {
  border-color: var(--sv-line);
  color: var(--sv-slate);
  background: rgba(255, 255, 255, 0.4);
}

.sv-btn-sm {
  padding: 0.35rem 0.7rem;
  font-size: 0.82rem;
}

.sv-guide-card {
  display: flex;
  gap: 0.85rem;
  align-items: center;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--sv-line);
  border-radius: 1rem;
  padding: 0.85rem 1rem;
  backdrop-filter: blur(6px);
}

.sv-guide-portrait {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--sv-amber);
}

.sv-guide-meta h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.25rem;
  margin: 0;
  color: var(--sv-green-deep);
}

.sv-guide-meta p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--sv-muted);
}

.sv-guide-status {
  margin-top: 0.35rem !important;
  color: var(--sv-ink) !important;
  font-size: 0.88rem !important;
}

.sv-guide-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.75rem;
}

.sv-section {
  padding: 2.5rem 0 0.5rem;
}

.sv-section--map-first {
  padding-top: 1.35rem;
}

.sv-section-head {
  margin-bottom: 1.25rem;
}

.sv-section-head h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(1.6rem, 3vw, 2rem);
  color: var(--sv-green-deep);
  margin: 0 0 0.35rem;
}

.sv-section-head p {
  color: var(--sv-muted);
  max-width: 40rem;
  margin: 0;
}

.sv-era-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.85rem;
}

@media (min-width: 768px) {
  .sv-era-list {
    grid-template-columns: repeat(3, 1fr);
  }
}

.sv-era {
  background: #fff;
  border: 1px solid var(--sv-line);
  border-radius: 0.85rem;
  padding: 1rem 1.1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.sv-era.is-active {
  border-color: var(--sv-green);
  box-shadow: 0 0 0 1px var(--sv-green);
}

.sv-era-years {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sv-amber);
  margin-bottom: 0.35rem;
}

.sv-era-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.15rem;
  margin: 0 0 0.4rem;
}

.sv-era-open {
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.sv-era-copy {
  font-size: 0.92rem;
  color: var(--sv-muted);
  margin: 0 0 0.75rem;
}

.sv-era-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.sv-map-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 1rem;
}

.sv-chip {
  border: 1px solid var(--sv-line);
  background: #fff;
  color: var(--sv-slate);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.sv-chip.is-active {
  background: var(--sv-green);
  border-color: var(--sv-green);
  color: #fff;
}

.sv-map-layout {
  display: grid;
  gap: 1rem;
}

@media (min-width: 900px) {
  .sv-map-layout {
    grid-template-columns: minmax(220px, 280px) 1fr;
    align-items: stretch;
  }
}

.sv-site-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  max-height: 420px;
  overflow: auto;
}

.sv-site-btn {
  width: 100%;
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  text-align: left;
  border: 1px solid var(--sv-line);
  background: #fff;
  border-radius: 0.65rem;
  padding: 0.65rem 0.75rem;
  cursor: pointer;
}

.sv-site-btn.is-active,
.sv-site-btn:hover {
  border-color: var(--sv-green);
  background: var(--sv-mist);
}

.sv-site-emoji {
  font-size: 1.35rem;
  line-height: 1;
}

.sv-site-copy {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.sv-site-copy strong {
  font-size: 0.95rem;
  color: var(--sv-ink);
}

.sv-site-copy span {
  font-size: 0.8rem;
  color: var(--sv-muted);
}

.sv-map-wrap {
  position: relative;
  min-height: min(52vh, 520px);
  border-radius: 0.85rem;
  overflow: hidden;
  border: 1px solid var(--sv-line);
  background: #0d1411;
}

.sv-map-canvas {
  width: 100%;
  height: 100%;
  min-height: min(52vh, 520px);
}

.sv-map-status {
  position: absolute;
  left: 0.75rem;
  bottom: 0.75rem;
  margin: 0;
  padding: 0.4rem 0.65rem;
  background: rgba(255, 255, 255, 0.92);
  border-radius: 0.4rem;
  font-size: 0.85rem;
  color: var(--sv-slate);
}

.sv-map-reset {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 2;
}

.sv-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
}

.sv-card {
  perspective: 900px;
  min-height: 300px;
}

.sv-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 300px;
  transition: transform 0.55s cubic-bezier(0.2, 0.7, 0.2, 1);
  transform-style: preserve-3d;
  -webkit-transform-style: preserve-3d;
  border-radius: 0.85rem;
}

.sv-card.is-flipped .sv-card-inner {
  transform: rotateY(180deg);
}

.sv-card-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 0.85rem;
  border: 1px solid var(--sv-line);
  padding: 1.1rem;
  background: #fff;
  overflow: hidden;
}

.sv-card-back {
  transform: rotateY(180deg);
  background: var(--sv-panel);
  color: var(--sv-panel-ink);
  border-color: var(--sv-green-deep);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.sv-card-front {
  width: 100%;
  text-align: left;
  cursor: pointer;
  color: inherit;
  appearance: none;
  -webkit-appearance: none;
  font: inherit;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  box-sizing: border-box;
}

.sv-card-emoji {
  font-size: 2rem;
  display: block;
  margin-bottom: 0.5rem;
}

.sv-card-name {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.2rem;
  margin: 0 0 0.35rem;
  color: var(--sv-ink);
}

.sv-card-tagline {
  color: var(--sv-muted);
  font-size: 0.95rem;
  line-height: 1.45;
  margin: 0 0 0.65rem;
}

.sv-card-back .sv-card-tagline,
.sv-card-back .sv-card-name {
  color: var(--sv-panel-ink);
}

.sv-card-history {
  font-size: 0.9rem;
  line-height: 1.5;
  flex: 1;
  margin: 0 0 0.75rem;
  overflow-wrap: anywhere;
}

.sv-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.sv-tag {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: var(--sv-mist);
  color: var(--sv-green);
  border-radius: 999px;
  padding: 0.2rem 0.55rem;
}

.sv-card-hint {
  font-size: 0.78rem;
  color: var(--sv-muted);
  margin: 0;
}

.sv-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.sv-footer-note {
  margin-top: 2.5rem;
  font-size: 0.8rem;
  color: var(--sv-muted);
}

.sv-sheet {
  position: fixed;
  inset: 0;
  z-index: 1080;
}

.sv-sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 25, 20, 0.55);
}

.sv-sheet-panel {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(520px, calc(100% - 2rem));
  max-height: min(80vh, 640px);
  overflow: auto;
  background: var(--sv-panel);
  color: var(--sv-panel-ink);
  border-radius: 1rem;
  padding: 1.25rem 1.35rem;
}

.sv-sheet-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.sv-sheet-header h2 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.35rem;
  margin: 0;
}

.sv-sheet-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--sv-amber);
  margin-bottom: 0.5rem;
}

.sv-sheet-footer {
  margin-top: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.sv-heygen-video {
  width: 100%;
  border-radius: 0.65rem;
  background: #000;
}

.sv-heygen-script {
  text-align: center;
  padding: 0.5rem 0 1rem;
}

.sv-heygen-script img {
  border-radius: 50%;
  border: 2px solid var(--sv-amber);
  margin-bottom: 0.75rem;
  object-fit: cover;
}

.sv-heygen-credit {
  font-size: 0.75rem;
  color: rgba(244, 248, 245, 0.7);
  margin: 0;
}

html[data-theme='dark'] .sv-page,
body.dark-mode .sv-page {
  --sv-mist: #1e2a24;
  --sv-mist-soft: #15201b;
  --sv-line: #3d5248;
  --sv-ink: #f2f7f4;
  --sv-muted: #c5d6cc;
  --sv-green: #8fc9a8;
  --sv-green-deep: #e4f0e8;
  --sv-slate: #d0ddd6;
  --sv-amber: #e2b66a;
  --sv-panel: #121a16;
  --sv-panel-ink: #f4f8f5;
  background: var(--sv-mist-soft);
  color: var(--sv-ink);
}

html[data-theme='dark'] .sv-era,
html[data-theme='dark'] .sv-site-btn,
html[data-theme='dark'] .sv-card-face:not(.sv-card-back),
html[data-theme='dark'] .sv-chip,
html[data-theme='dark'] .sv-guide-card,
body.dark-mode .sv-era,
body.dark-mode .sv-site-btn,
body.dark-mode .sv-card-face:not(.sv-card-back),
body.dark-mode .sv-chip,
body.dark-mode .sv-guide-card {
  background: #1c2923;
  border-color: var(--sv-line);
  color: var(--sv-ink);
}

/* Titles + captions: force readable contrast on dark cards */
html[data-theme='dark'] .sv-section-head h2,
html[data-theme='dark'] .sv-hero-title,
html[data-theme='dark'] .sv-guide-meta h2,
html[data-theme='dark'] .sv-era-title,
html[data-theme='dark'] .sv-card-name,
html[data-theme='dark'] .sv-site-copy strong,
html[data-theme='dark'] .sv-video-card h3,
html[data-theme='dark'] .sv-kicker,
body.dark-mode .sv-section-head h2,
body.dark-mode .sv-hero-title,
body.dark-mode .sv-guide-meta h2,
body.dark-mode .sv-era-title,
body.dark-mode .sv-card-name,
body.dark-mode .sv-site-copy strong,
body.dark-mode .sv-video-card h3,
body.dark-mode .sv-kicker {
  color: #f2f7f4;
}

html[data-theme='dark'] .sv-section-head p,
html[data-theme='dark'] .sv-hero-line,
html[data-theme='dark'] .sv-guide-meta p,
html[data-theme='dark'] .sv-era-copy,
html[data-theme='dark'] .sv-card-tagline,
html[data-theme='dark'] .sv-card-hint,
html[data-theme='dark'] .sv-card-history,
html[data-theme='dark'] .sv-site-copy span,
html[data-theme='dark'] .sv-gallery-item figcaption,
html[data-theme='dark'] .sv-video-blurb,
html[data-theme='dark'] .sv-video-source,
html[data-theme='dark'] .sv-context-evidence-note,
html[data-theme='dark'] .sv-footer-note,
html[data-theme='dark'] .sv-map-status,
body.dark-mode .sv-section-head p,
body.dark-mode .sv-hero-line,
body.dark-mode .sv-guide-meta p,
body.dark-mode .sv-era-copy,
body.dark-mode .sv-card-tagline,
body.dark-mode .sv-card-hint,
body.dark-mode .sv-card-history,
body.dark-mode .sv-site-copy span,
body.dark-mode .sv-gallery-item figcaption,
body.dark-mode .sv-video-blurb,
body.dark-mode .sv-video-source,
body.dark-mode .sv-context-evidence-note,
body.dark-mode .sv-footer-note,
body.dark-mode .sv-map-status {
  color: #d0e0d6;
}

html[data-theme='dark'] .sv-tag,
body.dark-mode .sv-tag {
  background: #2c3c34;
  color: #e4f0e8;
}

html[data-theme='dark'] .sv-hub-badge,
body.dark-mode .sv-hub-badge {
  background: color-mix(in srgb, var(--sv-green) 22%, #1c2923);
  color: #e4f0e8;
}

html[data-theme='dark'] .sv-gallery-item figcaption,
body.dark-mode .sv-gallery-item figcaption {
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.4;
  color: #e0ebe4;
}

html[data-theme='dark'] .sv-card-name,
body.dark-mode .sv-card-name {
  font-weight: 700;
  text-shadow: none;
}

html[data-theme='dark'] .sv-card-back .sv-card-name,
html[data-theme='dark'] .sv-card-back .sv-card-tagline,
html[data-theme='dark'] .sv-card-back .sv-card-history,
body.dark-mode .sv-card-back .sv-card-name,
body.dark-mode .sv-card-back .sv-card-tagline,
body.dark-mode .sv-card-back .sv-card-history {
  color: #f4f8f5;
}

html[data-theme='dark'] .sv-hero,
body.dark-mode .sv-hero {
  background:
    radial-gradient(ellipse at 15% 10%, rgba(47, 93, 70, 0.35), transparent 55%),
    linear-gradient(165deg, #15201b 0%, #1e2a24 100%);
}

/* Hub badge, eras with photos, gallery, video embeds */
.sv-hub-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.65rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--sv-green) 18%, #fff);
  color: var(--sv-green-deep);
  font-size: 0.85rem;
  font-weight: 700;
}

.sv-era {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  overflow: hidden;
  padding: 0;
}

.sv-era-media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--sv-mist);
}

.sv-era-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sv-era-body {
  padding: 0 1.1rem 1rem;
}

.sv-card.has-image .sv-card-front {
  padding-top: 0;
}

.sv-card-img {
  width: calc(100% + 2.2rem);
  margin: 0 -1.1rem 0.75rem;
  height: 148px;
  max-height: none;
  object-fit: cover;
  display: block;
  flex-shrink: 0;
  background: var(--sv-mist);
}

.sv-card.has-image .sv-card-name {
  margin-top: 0.15rem;
}

.sv-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
}

.sv-gallery-item {
  margin: 0;
  background: #fff;
  border: 1px solid var(--sv-line);
  border-radius: 0.75rem;
  overflow: hidden;
}

.sv-gallery-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.sv-gallery-item figcaption {
  padding: 0.55rem 0.7rem 0.75rem;
  font-size: 0.86rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--sv-ink);
}

.sv-video-grid {
  display: grid;
  gap: 1.25rem;
}

@media (min-width: 900px) {
  .sv-video-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.sv-video-card {
  background: #fff;
  border: 1px solid var(--sv-line);
  border-radius: 0.9rem;
  padding: 1rem 1.1rem 1.15rem;
}

.sv-video-card h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.05rem;
  margin: 0 0 0.35rem;
  color: var(--sv-green-deep);
}

.sv-video-blurb {
  font-size: 0.9rem;
  color: var(--sv-muted);
  margin: 0 0 0.75rem;
  line-height: 1.45;
}

.sv-video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 0.55rem;
  overflow: hidden;
  background: #0d1411;
}

.sv-video-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.sv-video-search {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.65rem 0.9rem;
  border-radius: 0.55rem;
  background: var(--sv-mist);
  color: var(--sv-green-deep);
  font-weight: 600;
  text-decoration: none;
}

.sv-video-search:hover {
  background: color-mix(in srgb, var(--sv-green) 20%, #fff);
}

.sv-video-source {
  margin: 0.55rem 0 0;
  font-size: 0.75rem;
  color: var(--sv-muted);
}

.sv-site-btn.is-hub {
  border-color: var(--sv-green);
  box-shadow: inset 3px 0 0 var(--sv-green);
}

.sv-chip[data-filter='steel'].is-active { background: #5c6570; border-color: #5c6570; }
.sv-chip[data-filter='sports'].is-active { background: #2a5f9e; border-color: #2a5f9e; }
.sv-chip[data-filter='music'].is-active { background: #8b3a62; border-color: #8b3a62; }
.sv-chip[data-filter='mob'].is-active { background: #3d2a4a; border-color: #3d2a4a; color: #f4eef8; }

.sv-onboarding {
  margin: 1.1rem 0 0;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--sv-line);
  border-left: 3px solid var(--sv-amber);
  background: color-mix(in srgb, var(--sv-mist) 70%, #fff);
  border-radius: 0.35rem;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--sv-ink);
}

.sv-context-evidence-note {
  margin: 0.65rem 0 0;
  font-size: 0.88rem;
  color: var(--sv-muted);
  max-width: 46rem;
}

.sv-event-filters {
  margin: 0.85rem 0 1rem;
}

.sv-event-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}

@media (min-width: 900px) {
  .sv-event-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.sv-event-card {
  display: grid;
  grid-template-columns: 5.4rem minmax(0, 1fr);
  gap: 0.85rem;
  margin: 0;
  padding: 0.85rem 0.95rem 0.95rem;
  background: #fff;
  border: 1px solid var(--sv-line);
  border-radius: 0.85rem;
  min-height: 0;
}

.sv-event-card.is-now {
  border-color: var(--sv-amber);
  box-shadow: inset 3px 0 0 var(--sv-amber);
}

.sv-event-card.is-past {
  opacity: 0.72;
}

.sv-event-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--sv-mist);
  border-radius: 0.65rem;
  padding: 0.55rem 0.35rem;
  color: var(--sv-green-deep);
}

.sv-event-date-month {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.sv-event-date-day {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.7rem;
  line-height: 1;
  font-weight: 700;
}

.sv-event-date-dow {
  font-size: 0.72rem;
  font-weight: 600;
  margin-top: 0.15rem;
}

.sv-event-body {
  min-width: 0;
}

.sv-event-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--sv-amber);
}

.sv-event-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.12rem 0.45rem;
  background: color-mix(in srgb, var(--sv-amber) 22%, #fff);
  color: var(--sv-green-deep);
  letter-spacing: 0.06em;
}

.sv-event-title {
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.08rem;
  margin: 0 0 0.2rem;
  color: var(--sv-green-deep);
}

.sv-event-when,
.sv-event-place,
.sv-event-copy {
  margin: 0 0 0.3rem;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--sv-muted);
}

.sv-event-copy {
  color: var(--sv-ink);
}

.sv-event-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.45rem;
}

.sv-event-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 1rem 1.1rem;
  border: 1px dashed var(--sv-line);
  border-radius: 0.75rem;
  color: var(--sv-muted);
}

html[data-theme='dark'] .sv-event-card,
body.dark-mode .sv-event-card {
  background: #1c2923;
  border-color: var(--sv-line);
}

html[data-theme='dark'] .sv-event-date,
body.dark-mode .sv-event-date {
  background: #2c3c34;
  color: #e4f0e8;
}

html[data-theme='dark'] .sv-event-title,
body.dark-mode .sv-event-title {
  color: #f2f7f4;
}

html[data-theme='dark'] .sv-event-when,
html[data-theme='dark'] .sv-event-place,
html[data-theme='dark'] .sv-event-copy,
html[data-theme='dark'] .sv-event-empty,
body.dark-mode .sv-event-when,
body.dark-mode .sv-event-place,
body.dark-mode .sv-event-copy,
body.dark-mode .sv-event-empty {
  color: #d0e0d6;
}

.sv-story-mode {
  margin-top: 1.15rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(196, 138, 58, 0.45);
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.55);
}

.sv-story-mode-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  margin-bottom: 0.35rem;
}

.sv-story-mode-kicker {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--sv-amber);
}

.sv-story-mode-copy {
  margin: 0;
  font-size: 0.88rem;
  color: var(--sv-slate);
  line-height: 1.45;
}

.sv-story-narrate {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.85rem;
  color: var(--sv-slate);
  cursor: pointer;
}

.sv-story-panel {
  margin-top: 0.55rem;
}

.sv-story-status {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.82rem;
  color: var(--sv-green-deep);
  font-weight: 600;
}

.sv-story-dots {
  display: flex;
  gap: 0.3rem;
}

.sv-story-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--sv-line);
}

.sv-story-dot.is-active {
  background: var(--sv-amber);
  transform: scale(1.25);
}

.sv-story-dot.is-done {
  background: var(--sv-green);
}

.sv-story-error {
  margin: 0.4rem 0 0;
  font-size: 0.85rem;
  color: #8a2f2f;
}

.sv-story-overlay {
  position: fixed;
  inset-inline: 0;
  bottom: clamp(16px, 4vh, 40px);
  z-index: 1150;
  display: flex;
  justify-content: center;
  padding: 0 1rem;
  pointer-events: none;
}

.sv-story-chip {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  max-width: min(640px, 94vw);
  padding: 1rem 1.2rem;
  border: 1px solid rgba(196, 138, 58, 0.55);
  border-radius: 14px;
  background:
    radial-gradient(ellipse 80% 60% at 12% 0%, rgba(196, 138, 58, 0.16), transparent 55%),
    rgba(18, 26, 22, 0.94);
  color: #f4f8f5;
  box-shadow:
    0 0 0 1px rgba(255, 232, 168, 0.08) inset,
    0 22px 48px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(10px);
}

.sv-story-chip.is-beat {
  animation: sv-story-beat 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes sv-story-beat {
  0% { transform: translateY(12px) scale(0.97); opacity: 0.55; }
  100% { transform: translateY(0) scale(1); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .sv-story-chip.is-beat { animation: none; }
}

.sv-story-chip img {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 2px solid var(--sv-amber);
  flex: 0 0 auto;
  object-fit: cover;
}

.sv-story-kicker {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #e2b66a;
}

.sv-story-title {
  margin: 0.15rem 0 0.3rem;
  font-family: 'Fraunces', Georgia, serif;
  font-size: 1.28rem;
  font-weight: 700;
}

.sv-story-body {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.45;
  color: rgba(244, 248, 245, 0.9);
}

.sv-story-progress {
  margin: 0.45rem 0 0;
  font-size: 0.78rem;
  color: rgba(226, 182, 106, 0.9);
}

.sv-story-spotlight {
  outline: 3px solid var(--sv-amber);
  outline-offset: 6px;
  border-radius: 14px;
}

body.sv-story-running .sv-guide-card {
  border-color: var(--sv-amber);
}

html[data-theme='dark'] .sv-onboarding,
html[data-theme='dark'] .sv-story-mode,
body.dark-mode .sv-onboarding,
body.dark-mode .sv-story-mode {
  background: #1c2923;
  border-color: var(--sv-line);
  color: var(--sv-ink);
}

html[data-theme='dark'] .sv-story-mode-copy,
body.dark-mode .sv-story-mode-copy {
  color: var(--sv-muted);
}

html[data-theme='dark'] .sv-gallery-item,
html[data-theme='dark'] .sv-video-card,
body.dark-mode .sv-gallery-item,
body.dark-mode .sv-video-card {
  background: #1c2923;
  border-color: var(--sv-line);
  color: var(--sv-ink);
}

html[data-theme='dark'] .sv-video-card h3,
body.dark-mode .sv-video-card h3 {
  color: #f2f7f4;
}

html[data-theme='dark'] .sv-video-blurb,
html[data-theme='dark'] .sv-video-source,
body.dark-mode .sv-video-blurb,
body.dark-mode .sv-video-source {
  color: #d0e0d6;
}

html[data-theme='dark'] .sv-video-search,
body.dark-mode .sv-video-search {
  background: #eef4f0;
  color: #1a2420;
}

html[data-theme='dark'] .sv-video-search:hover,
body.dark-mode .sv-video-search:hover {
  background: #fff;
  color: #1a2420;
}

/* David AI fab — portrait avatar */
.sv-page .ai-chat-button.ai-chat-button--avatar {
  width: 64px;
  height: 64px;
  padding: 0;
  overflow: hidden;
  background: var(--sv-green-deep);
  border: 2px solid var(--sv-amber);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

.sv-page .ai-chat-button.ai-chat-button--avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sv-page .ai-chat-header {
  background: linear-gradient(135deg, #2f5d46, #1e3d2e) !important;
}

.sv-page .ai-chat-header-guide {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  font-size: 1.05rem;
}

.sv-page .ai-chat-header-guide img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(196, 138, 58, 0.85);
}
