/* ──────────────────────────────────────────────────────────────
   guided_assistant.css — the bead frame and the prayer card.

   The one page where gold does real work: the chain, the beads and
   the mystery band are the rosary itself. Bead states are solid
   fills at three weights — upcoming (hairline), completed (ink
   gold), active (gold with a ring). Class names and element
   structure are owned by guided_assistant_chain.js and
   guided_assistant_prayer_card.js; only the colours live here.
   ────────────────────────────────────────────────────────────── */

.ga-frame {
  --ga-gold: var(--color-gold);
  --ga-band: #3a2a10;
}

/* ── Beads ───────────────────────────────────────────────────── */
.bead {
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s var(--ease-out-std),
    border-color 0.3s var(--ease-out-std), box-shadow 0.3s var(--ease-out-std);
  position: relative;
  z-index: 1;
}

.bead--small {
  width: 13px;
  height: 13px;
}
.bead--medium {
  width: 17px;
  height: 17px;
}
.bead--large {
  width: 21px;
  height: 21px;
}
.bead--medallion {
  width: 28px;
  height: 28px;
  border-radius: 5px;
}

.bead--upcoming {
  background: color-mix(in oklab, var(--color-gold) 18%, transparent);
  border: 1px solid var(--gold-hairline);
}

.bead--completed {
  background: color-mix(in oklab, var(--color-gold) 85%, #6b4a12);
  border: 1px solid color-mix(in oklab, var(--color-gold) 60%, #4a3208);
}

.bead--active {
  background: var(--color-gold);
  border: 2px solid color-mix(in oklab, var(--color-gold) 70%, #fff);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--color-gold) 28%, transparent);
}

.bead-mystery-label {
  font-size: 0.5rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}

.bead--medallion.bead--upcoming .bead-mystery-label {
  color: var(--color-caution);
}

.bead--medallion.bead--active .bead-mystery-label {
  color: #3a2a10;
}

/* ── Chain sections — spacing is set by JS grid (1fr tracks) ── */
.chain-top-seg {
  flex: 1;
  overflow: hidden;
  min-width: 0;
}
.chain-side {
  overflow: hidden;
}
.chain-bottom-seg {
  flex: 1;
  overflow: hidden;
}

/* ── Prayer words ────────────────────────────────────────────── */
.prayer-word {
  display: inline;
  border-radius: 3px;
  padding: 0 2px;
}

.prayer-word--upcoming {
  color: var(--color-ink);
}
.prayer-word--spoken {
  color: var(--color-ink-3);
}
.prayer-word--active {
  background: color-mix(in oklab, var(--color-gold) 30%, transparent);
  color: var(--color-ink);
}

.prayer-word--response.prayer-word--upcoming {
  color: var(--color-rubric);
}
.prayer-word--response.prayer-word--spoken {
  color: color-mix(in oklab, var(--color-rubric) 40%, var(--color-ground));
}
.prayer-word--response.prayer-word--active {
  background: color-mix(in oklab, var(--color-rubric) 14%, transparent);
  color: var(--color-rubric);
}

/* ── Frame internals ─────────────────────────────────────────── */
.ga-frame {
  position: relative;
  width: 100%;
  min-width: 300px;
  max-width: 100%;
  height: min(calc(100dvh - 200px), 620px);
  min-height: 400px;
  max-height: calc(100dvh - 100px);
  display: flex;
  flex-direction: column;
  resize: both;
  overflow: hidden;
  padding: 0;
}

.ga-frame::-webkit-resizer {
  background: color-mix(in oklab, var(--color-gold) 30%, transparent);
  border-radius: 0 0 var(--radius-lg) 0;
}

.ga-card {
  background: var(--material-strong);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 0.5px solid var(--gold-hairline);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-hair);
}

.ga-prayer-card {
  flex-shrink: 0;
  border-left: 2px solid var(--color-gold);
  padding: 0.8rem 0.95rem;
}

.ga-prayer-card__label {
  font-size: var(--text-meta);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--color-caution);
  margin-bottom: 0.3rem;
}

.ga-prayer-card__text {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--color-ink);
  font-family: var(--font-body);
}

.ga-mystery-band {
  min-height: 70px;
  background: var(--ga-band);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.18rem;
  padding: 0.55rem;
}

.ga-mystery-band__numeral {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-gold);
  line-height: 1;
}

.ga-mystery-band__name {
  font-size: var(--text-meta);
  font-weight: 500;
  color: rgb(255 255 255 / 0.78);
  letter-spacing: 0.01em;
  text-align: center;
}

.ga-intention {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  font-size: var(--text-meta);
  color: var(--color-ink-2);
  padding: 0.25rem 0;
  border-bottom: 0.5px solid var(--hairline);
}

.ga-intention:last-child {
  border-bottom: 0;
}

.ga-intention__mark {
  color: var(--color-gold);
  flex-shrink: 0;
  font-size: 0.5rem;
  margin-top: 0.42rem;
}

.ga-pause-pill {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 100;
  background: var(--color-ink);
  color: var(--color-ground);
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  font-size: var(--text-meta);
  font-weight: 560;
}

/* ── Status line ─────────────────────────────────────────────── */
[data-state="listening"] {
  color: var(--color-affirm);
}
[data-state="error"] {
  color: var(--color-rubric);
}
[data-state="complete"] {
  color: var(--color-accent);
  font-weight: 650;
}
[data-state="connecting"] {
  color: var(--color-caution);
}
[data-state="loading"] {
  color: var(--color-ink-3);
}
[data-state="idle"] {
  color: var(--color-ink-2);
}
