/* The Kindling Songs — shared stylesheet */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,600;1,9..144,400&family=Nunito:wght@300;400;600&display=swap');

:root {
  --paper: #1e1a16;
  --paper-shadow: rgba(0, 0, 0, 0.35);
  --ink: #f0e8d8;
  --muted: #a89880;
  --border: rgba(240, 232, 216, 0.12);

  --button-dark: #c8784a;
  --button-dark-text: #1e1a16;
  --button-outline: #c8784a;

  --panel: rgba(255, 255, 255, 0.04);
  --panel-strong: rgba(255, 255, 255, 0.06);

  --left: #e87d4a;
  --left-bg: rgba(232, 125, 74, 0.15);

  --right: #6aabde;
  --right-bg: rgba(106, 171, 222, 0.15);

  --all: #5ab87a;
  --all-bg: rgba(90, 184, 122, 0.15);
}

* {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: 'Nunito', sans-serif;
  font-weight: 300;
  line-height: 1.65;
  background:
    radial-gradient(ellipse at 65% 0%, rgba(160, 80, 20, 0.18) 0%, transparent 55%),
    radial-gradient(ellipse at 25% 100%, rgba(100, 50, 10, 0.14) 0%, transparent 50%),
    radial-gradient(ellipse at 100% 60%, rgba(120, 60, 15, 0.1) 0%, transparent 40%),
    var(--paper);
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
}

main.page,
.page {
  width: 100%;
}

.landing-page,
.song-page {
  padding: 0;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 760px;
  margin: 0 auto;
  padding: 1rem 1rem 0 1rem;
}

.topbar-nav {
  display: flex;
  gap: 1.2rem;
  align-items: center;
}

.home-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
}

.home-link:hover,
.home-link:focus {
  text-decoration: underline;
}

.roots-link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.78rem;
  opacity: 0.6;
  letter-spacing: 0.04em;
}

.roots-link:hover,
.roots-link:focus {
  opacity: 1;
  text-decoration: underline;
}

.landing-hero,
.how-it-works,
.landing-actions,
.song-header,
.song-audio,
.reflection-section,
.lyrics-section,
.genesis-section,
.song-navigation,
.song-navigation-continue,
.song-navigation-paypal,
.site-footer {
  max-width: 760px;
  margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

.landing-hero,
.song-header {
  padding-top: 1rem;
}

.site-title {
  margin: 0 0 0.25rem 0;
}

.site-title,
.song-title,
h1, h2, h3 {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-optical-sizing: auto;
  line-height: 1.15;
  margin: 0 0 1rem 0;
  font-size: clamp(2rem, 5vw, 3.25rem);
}

.part-label {
  margin: 0 0 0.35rem 0;
  color: var(--muted);
  font-style: italic;
  font-size: 0.98rem;
}

.tagline,
.lead {
  margin: 0 0 1rem 0;
  font-size: 1.1rem;
}

.intro-text,
.grounding-line,
.song-teaser p,
.genesis-copy p,
.reflection-section p {
  margin: 0 0 1rem 0;
}

.how-it-works,
.reflection-section,
.song-audio,
.lyrics-section,
.genesis-section,
.song-navigation {
  margin-top: 1.5rem;
}

.how-it-works h2,
.reflection-section h2,
.singing-key h3 {
  font-size: 1.1rem;
  font-weight: bold;
  margin: 0 0 0.75rem 0;
}

.how-list,
.reflection-list,
.footer-links {
  margin: 0;
}

.how-list,
.reflection-list {
  padding-left: 1.25rem;
}

.how-list li,
.reflection-list li {
  margin-bottom: 0.6rem;
}

.song-teaser,
.reflection-section {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 6px 18px var(--paper-shadow);
  padding: 1rem 1rem 0.8rem 1rem;
}

.song-audio audio {
  width: 100%;
  max-width: 100%;
}

.landing-actions {
  display: block;
}

.song-navigation,
.song-navigation-continue {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: stretch;
  margin-top: 2rem;
}
.song-navigation-paypal {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: stretch;
  margin-top: 1.5rem;
}
.song-navigation .button,
.song-navigation-continue .button,
.song-navigation-paypal .button,
.song-navigation-paypal .button-kindling {
  text-align: center;
}
.song-navigation .button-primary,
.song-navigation-continue .button-primary {
  text-align: center;
}

.button,
.btn {
  display: inline-block;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.85rem 1.25rem;
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 1.05rem;
  border: 1px solid transparent;
  transition: transform 120ms ease, opacity 120ms ease, background 120ms ease;
}

.button:hover,
.button:focus,
.btn:hover,
.btn:focus {
  transform: translateY(-1px);
  opacity: 0.96;
}

.button-primary,
.primary {
  background: var(--button-dark);
  color: var(--button-dark-text);
}

.button-secondary,
.secondary {
  background: transparent;
  color: var(--button-outline);
  border-color: var(--button-outline);
}

.threshold-note {
  display: block;
  margin: 0.8rem 0 0 0;
  color: var(--ink);
  font-family: 'Fraunces', serif;
  font-size: 1.1rem;
  font-weight: bold;
}

.action-buttons {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: stretch;
  margin-top: 1.8rem;
}
.action-buttons .button {
  text-align: center;
}
.action-divider {
  text-align: center;
  color: rgba(200,120,74,0.35);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  margin: 0.5rem 0 0.25rem;
  user-select: none;
}

.home-quote {
  margin: 2rem 0 0.5rem;
  padding-left: 1.1rem;
  border-left: 2px solid rgba(200,120,74,0.35);
}
.home-quote p {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-style: italic;
  font-size: 1rem;
  color: var(--muted);
  line-height: 1.5;
  margin: 0 0 0.3rem 0;
}
.home-quote cite {
  font-size: 0.75rem;
  color: var(--muted);
  opacity: 0.6;
  font-style: normal;
  letter-spacing: 0.05em;
}

details {
  background: var(--panel-strong);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 6px 18px var(--paper-shadow);
  overflow: hidden;
}

details + details {
  margin-top: 1rem;
}

summary {
  cursor: pointer;
  list-style: none;
  padding: 1rem;
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 1.05rem;
}

summary::-webkit-details-marker {
  display: none;
}

details[open] summary {
  border-bottom: 1px solid var(--border);
}

.lyrics-section details > *:not(summary),
.genesis-section details > *:not(summary),
.kindling-draw-section details > *:not(summary),
.reflection-capture-section details > *:not(summary) {
  padding-left: 1rem;
  padding-right: 1rem;
}

.lyrics-block,
.genesis-block,
pre {
  margin: 0;
  padding: 1rem 1rem 1.1rem 1rem;
  white-space: pre-wrap;
  word-break: normal;
  overflow-wrap: anywhere;
  font-family: "Courier New", Courier, monospace;
  font-size: 0.95rem;
  line-height: 1.55;
  background: transparent;
}

.genesis-copy {
  font-family: 'Nunito', sans-serif;
  font-weight: 300;
  font-size: 1rem;
  line-height: 1.7;
  padding-bottom: 1rem;
  white-space: normal;
}

.genesis-section details > p.genesis-copy {
  padding-left: 1rem;
  padding-right: 1rem;
}

.singing-key {
  padding-top: 1rem;
}

.singing-key-items {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.key-chip {
  display: inline-block;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 2px solid transparent;
  font-size: 0.92rem;
}

.key-left {
  color: var(--left);
  background: var(--left-bg);
  border-color: var(--left);
}

.key-right {
  color: var(--right);
  background: var(--right-bg);
  border-color: var(--right);
}

.key-all {
  color: var(--all);
  background: var(--all-bg);
  border-color: var(--all);
}

.sing-inline {
  display: inline;
  padding: 0.05rem 0.3rem;
  border-radius: 6px;
}

.sing-inline.left {
  color: var(--left);
  background: var(--left-bg);
}

.sing-inline.right {
  color: var(--right);
  background: var(--right-bg);
}

.sing-inline.all {
  color: var(--all);
  background: var(--all-bg);
}

.site-footer {
  padding-top: 2rem;
  padding-bottom: 3rem;
}

.footer-links,
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.95rem;
}

.footer-links a,
.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover,
.footer-links a:focus,
.site-footer a:hover,
.site-footer a:focus {
  text-decoration: underline;
}

.footer-divider {
  color: var(--muted);
}

.song-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.button-song {
  display: block;
  text-decoration: none;
  border-radius: 10px;
  padding: 0.75rem 1.1rem;
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 1rem;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--border);
  transition: background 150ms ease, transform 120ms ease, border-color 150ms ease;
  text-align: left;
}

.button-song:hover,
.button-song:focus {
  background: var(--panel-strong);
  border-color: rgba(240,228,204,0.22);
  transform: translateX(3px);
}

.button-song .song-num {
  font-family: 'Nunito', sans-serif;
  font-weight: 300;
  font-size: 0.78rem;
  color: var(--muted);
  margin-right: 0.6rem;
  letter-spacing: 0.04em;
}

.kindling-section {  max-width: 760px;
  margin: 2rem auto 0;
  padding-left: 1rem;
  padding-right: 1rem;
  text-align: center;
}

.kindling-section p {
  font-size: 0.88rem;
  color: var(--muted);
  font-style: italic;
  margin-bottom: 0.8rem;
}

.button-kindling {
  display: inline-block;
  text-align: center;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.85rem 1.25rem;
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 1.05rem;
  border: 1px solid transparent;
  background: var(--button-dark);
  color: var(--button-dark-text);
  transition: transform 120ms ease, opacity 120ms ease, background 120ms ease;
}

.button-kindling:hover,
.button-kindling:focus {
  transform: translateY(-1px);
  opacity: 0.96;
}

@media (max-width: 640px) {
  html {
    font-size: 15px;
  }

  .button,
  .btn {
    width: 100%;
    text-align: center;
  }

  .footer-links,
  .site-footer nav,
  .singing-key-items {
    align-items: flex-start;
  }
}

/* ── Kindling draw widget ────────────────────────────────── */
.kd-wrap {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
  padding: 1.4rem 1.4rem 1.2rem;
  margin-top: 0.5rem;
}
.kd-header {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 1rem;
}
.kd-title {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-size: 1rem;
  color: var(--ink);
}
.kd-sub {
  font-size: 0.72rem;
  color: var(--muted);
  letter-spacing: 0.04em;
}
.kd-controls {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  flex-wrap: wrap;
}
.kd-select {
  font-family: 'Nunito', sans-serif;
  font-weight: 300;
  font-size: 0.78rem;
  color: var(--muted);
  background: var(--panel-strong);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.4rem 0.7rem;
  outline: none;
  cursor: pointer;
  flex: 1;
  min-width: 0;
}
.kd-btn {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-style: normal;
  font-size: 1.05rem;
  color: #d4b84a;
  background: rgba(212,184,74,0.08);
  border: 1px solid rgba(212,184,74,0.4);
  border-radius: 8px;
  padding: 0.4rem 1.1rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.kd-btn:hover {
  background: rgba(212,184,74,0.18);
  border-color: rgba(212,184,74,0.7);
}
.kd-card {
  margin-top: 1.1rem;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: var(--panel-strong);
  overflow: hidden;
  transition: border-color 0.2s;
  animation: kd-appear 0.3s ease;
}
@keyframes kd-appear {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.kd-card-accent {
  height: 4px;
  width: 100%;
}
.kd-card-body {
  padding: 1rem 1.1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.kd-card-meta {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  margin-bottom: 0.2rem;
}
.kd-card-symbol {
  font-size: 1rem;
  line-height: 1;
}
.kd-card-cluster {
  font-size: 0.65rem;
  letter-spacing: 0.07em;
  font-weight: 300;
}
.kd-card-type {
  font-size: 0.62rem;
  color: var(--muted);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  margin-left: auto;
}
.kd-card-title {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 1rem;
  color: var(--ink);
  line-height: 1.25;
}
.kd-card-author {
  font-size: 0.72rem;
  color: var(--muted);
}
.kd-card-desc {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.6;
  margin-top: 0.3rem;
}
.kd-card-link {
  display: inline-block;
  margin-top: 0.7rem;
  font-size: 0.72rem;
  color: var(--button-outline);
  text-decoration: none;
  border: 1px solid rgba(200,120,74,0.35);
  border-radius: 999px;
  padding: 0.25rem 0.8rem;
  transition: all 0.18s;
}
.kd-card-link:hover {
  background: rgba(200,120,74,0.1);
}

.kindling-draw-section {
  max-width: 760px;
  margin: 1.5rem auto 0.5rem;
  padding-left: 1rem;
  padding-right: 1rem;
}
.kindling-draw-section::before {
  content: '';
  display: block;
  width: 36px;
  height: 36px;
  margin: 0 auto 1rem;
  background: url('pigeon.png') center/contain no-repeat;
  filter: opacity(0.55);
  mix-blend-mode: screen;
}

/* ── Reflection capture widget ───────────────────────────── */
.rc-wrap {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
  padding: 1.4rem 1.4rem 1.2rem;
}
.rc-header { margin-bottom: 1rem; }
.rc-title {
  display: block;
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 1.05rem;
  color: var(--ink);
  margin-bottom: 0.3rem;
}
.rc-sub {
  display: block;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.55;
}
.rc-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}
.rc-tab {
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  padding: 0.3rem 0.75rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition: all 0.18s;
}
.rc-tab.active {
  color: var(--ink);
  border-color: rgba(200,168,120,0.5);
  background: var(--panel-strong);
}
.rc-area { display: none; }
.rc-area.active { display: block; }
.rc-textarea {
  width: 100%;
  min-height: 110px;
  font-family: 'Nunito', sans-serif;
  font-weight: 300;
  font-size: 0.82rem;
  color: var(--ink);
  background: var(--panel-strong);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.75rem;
  resize: vertical;
  outline: none;
  line-height: 1.6;
}
.rc-textarea:focus { border-color: rgba(200,168,120,0.4); }
.rc-textarea::placeholder { color: var(--muted); opacity: 0.5; }
.rc-mic-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 0;
}
.rc-mic {
  width: 48px; height: 48px; border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--panel-strong);
  font-size: 1.2rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}
.rc-mic:hover { border-color: rgba(200,168,120,0.4); }
.rc-mic.recording {
  border-color: rgba(232,125,74,0.7);
  background: rgba(232,125,74,0.1);
  animation: pulse-mic 1.2s ease-in-out infinite;
}
.rc-mic-status { font-size: 0.68rem; color: var(--muted); text-align: center; }
.rc-transcript {
  display: none;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.55;
  background: var(--panel-strong);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.6rem 0.75rem;
  margin-top: 0.5rem;
}
.rc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.85rem;
  flex-wrap: wrap;
}
.rc-privacy {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.68rem;
  color: var(--muted);
  cursor: pointer;
  flex: 1;
  line-height: 1.45;
}
.rc-privacy input[type=checkbox] {
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--button-outline);
  cursor: pointer;
}
.rc-save {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 1.05rem;
  color: #5ab87a;
  background: rgba(90,184,122,0.08);
  border: 1px solid rgba(90,184,122,0.4);
  border-radius: 8px;
  padding: 0.38rem 1rem;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.rc-save:hover { background: rgba(90,184,122,0.18); }
.rc-saved {
  font-size: 0.72rem;
  color: #5ab87a;
  margin-top: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  flex-wrap: wrap;
}
.rc-view-all {
  font-size: 0.68rem;
  color: var(--button-outline);
  text-decoration: none;
}
.rc-view-all:hover { text-decoration: underline; }
.reflection-capture-section {
  max-width: 760px;
  margin: 2rem auto 1rem;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* ── Journey summary widget ──────────────────────────────── */
.js-wrap {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
  padding: 1.6rem 1.4rem 1.4rem;
}
.js-empty { border-style: dashed; }
.js-empty-msg { font-size: 0.8rem; color: var(--muted); line-height: 1.6; }
.js-header { margin-bottom: 1.2rem; }
.js-title {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-size: 1.15rem;
  color: var(--ink);
}
.js-sub { font-size: 0.7rem; color: var(--muted); margin-top: 0.2rem; }
.js-reflections {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 0.3rem;
}
.js-reflections::-webkit-scrollbar { width: 3px; }
.js-reflections::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.js-entry {
  background: var(--panel-strong);
  border-radius: 8px;
  padding: 0.7rem 0.9rem;
  border-left: 3px solid rgba(200,120,74,0.4);
}
.js-entry-song {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--button-outline);
  margin-bottom: 0.3rem;
  text-transform: uppercase;
}
.js-entry-date { color: var(--muted); font-weight: 300; margin-left: 0.4rem; }
.js-entry-text { font-size: 0.78rem; color: var(--ink); line-height: 1.6; }
.js-privacy { margin-bottom: 1rem; }
.js-actions { display: flex; flex-direction: column; gap: 0.3rem; margin-bottom: 1rem; }
.js-generate {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-style: normal;
  font-size: 1.05rem;
  color: #d4b84a;
  background: rgba(212,184,74,0.1);
  border: 1.5px solid rgba(212,184,74,0.5);
  border-radius: 10px;
  padding: 0.65rem 1.2rem;
  cursor: pointer;
  transition: all 0.2s;
}
.js-generate:hover:not(:disabled) { background: rgba(212,184,74,0.22); }
.js-pdf-btn {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 1.05rem;
  color: #f0e4cc;
  background: rgba(200,120,74,0.15);
  border: 1.5px solid rgba(200,120,74,0.5);
  border-radius: 10px;
  padding: 0.65rem 1.2rem;
  cursor: pointer;
  transition: all 0.2s;
  width: 100%;
}
.js-pdf-btn:hover { background: rgba(200,120,74,0.28); }
.js-generate:disabled { opacity: 0.4; cursor: not-allowed; }
.js-generate-sub { font-size: 0.65rem; color: var(--muted); letter-spacing: 0.04em; }
.js-loading {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 1rem;
}
.js-spinner {
  width: 14px; height: 14px; border-radius: 50%;
  border: 1.5px solid rgba(200,168,120,0.2);
  border-top-color: var(--button-outline);
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}
.js-results { border-top: 1px solid var(--border); padding-top: 1.2rem; margin-top: 1rem; }
.js-themes-title, .js-resources-title {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-size: 0.9rem;
  color: var(--ink);
  margin-bottom: 0.5rem;
}
.js-resources-title { margin-top: 1rem; }
.js-themes { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-bottom: 0.5rem; }
.js-theme-tag {
  font-size: 0.63rem;
  letter-spacing: 0.06em;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(212,184,74,0.4);
  color: #d4b84a;
  background: rgba(212,184,74,0.08);
}
.js-resources { display: flex; flex-direction: column; gap: 0.6rem; }
.js-resource-item {
  background: var(--panel-strong);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.7rem 0.85rem;
}
.js-resource-title {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 0.88rem;
  color: var(--ink);
}
.js-resource-author { font-size: 0.65rem; color: var(--muted); margin-bottom: 0.25rem; }
.js-resource-reason { font-size: 0.72rem; color: var(--muted); line-height: 1.55; }
.js-resource-link {
  display: inline-block;
  margin-top: 0.5rem;
  font-size: 0.68rem;
  color: var(--button-outline);
  text-decoration: none;
  border: 1px solid rgba(200,120,74,0.3);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
}
.js-downloads {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.2rem;
  align-items: center;
}
.js-open-kindling {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-style: normal;
  font-size: 1.05rem;
  color: #d4b84a;
  text-decoration: none;
  border: 1px solid rgba(212,184,74,0.4);
  border-radius: 8px;
  padding: 0.4rem 0.9rem;
  transition: all 0.2s;
}
.js-open-kindling:hover { background: rgba(212,184,74,0.1); }
.js-download {
  font-family: 'Fraunces', serif;
  font-weight: 400;
  font-size: 0.85rem;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.4rem 0.9rem;
  cursor: pointer;
  transition: all 0.18s;
}
.js-download:hover { border-color: rgba(200,168,120,0.4); color: var(--ink); }
.js-error {
  font-size: 0.72rem;
  color: #c87a4a;
  background: rgba(200,120,74,0.08);
  border: 1px solid rgba(200,120,74,0.2);
  border-radius: 6px;
  padding: 0.6rem 0.8rem;
  margin-top: 0.6rem;
}
.js-clear { margin-top: 1.4rem; text-align: center; }
.js-clear-btn {
  font-size: 0.65rem;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  opacity: 0.5;
}
.js-clear-btn:hover { opacity: 1; }
.journey-summary-section {
  max-width: 760px;
  margin: 2rem auto 0;
  padding-left: 1rem;
  padding-right: 1rem;
}

/* ── Kindling draw — flip card ───────────────────────────── */
/* Song page flip card — same size and format as the zoom card on the kindling page */
/* kd-scene uses padding-bottom hack for reliable 2:3 portrait ratio in all browsers */
.kd-scene {
  perspective: 1200px;
  width: 240px;
  height: 0;
  padding-bottom: 360px; /* 240 * 3/2 */
  position: relative;
  margin: 1.1rem auto;
  cursor: pointer;
}
@media(min-width:480px){ .kd-scene { width:280px; padding-bottom:420px; } }
@media(min-width:768px){ .kd-scene { width:310px; padding-bottom:465px; } }

.kd-flipcard {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}
.kd-flipcard.flipped { transform: rotateY(180deg); }

.kd-face {
  position: absolute;
  inset: 0;
  border-radius: 14px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.8), 0 2px 8px rgba(0,0,0,0.5);
}

/* Back face */
.kd-back {
  background: url('card-back.jpg') center/108% no-repeat;
  background-color: #2a1508;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.kd-back::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 60%;
  background: linear-gradient(to bottom,rgba(10,6,2,0.82) 0%,rgba(10,6,2,0.35) 55%,transparent 100%);
  border-radius: 14px 14px 0 0;
  pointer-events: none;
}
.kd-tap-prompt {
  font-family: 'Fraunces', serif;
  font-weight: 300;
  font-style: italic;
  font-size: 0.85rem;
  color: rgba(255,240,200,0.9);
  text-shadow: 0 1px 6px rgba(0,0,0,1), 0 0 12px rgba(0,0,0,0.9);
  letter-spacing: 0.06em;
  text-align: center;
  padding: 0 1.2rem;
  position: relative;
  z-index: 2;
  margin-top: 55%;
}

/* Front face — same as zoom-card on kindling page */
.kd-front {
  transform: rotateY(180deg);
  background: url('card-front.jpg') center/108% no-repeat;
  background-color: #2a1508;
}

/* ── Kindling draw details wrapper ──────────────────────── */
.kd-details { margin: 0; overflow: visible; }
.kd-details .kd-wrap { background: none; border: none; box-shadow: none; padding: 0.5rem 0 0; }
.kd-details .kd-scene {
  display: block;
  margin: 0.75rem auto 0.5rem;
  height: 360px;
  padding-bottom: 0;
}
@media(min-width:480px){ .kd-details .kd-scene { height:420px; width:280px; } }
@media(min-width:768px){ .kd-details .kd-scene { height:465px; width:310px; } }
.kd-details .kd-face {
  background-size: contain !important;
  background-position: center !important;
}
.kd-details .kd-controls {
  padding: 0 1rem 1rem;
}

/* ── Reflection capture — static layout ─────────────────── */
.rc-static {
  width: 100%;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: 0 6px 18px var(--paper-shadow);
  padding: 1rem 1rem 0.8rem 1rem;
}
.rc-heading {
  font-family: 'Fraunces', serif;
  font-weight: bold;
  font-size: 1.1rem;
  color: var(--ink);
  margin: 0 0 0.75rem 0;
}

/* When capture widget sits inside the reflection-section box, strip its own box */
.reflection-section .rc-static {
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  margin-top: 0.5rem;
}
