/* Daily | Learn toggle, the Learn path, and the full screen lesson player.
   The player reuses the main quiz pieces (.q-top, .bar, .opt, .q-foot, .fb) from styles.css. */

/* Toggle: a pill with a sliding highlight */
/* Two tabs now (Ethan 2026-11-11): Daily (word game) | Trivia. Bible or Not? and Learn are hidden for now, their code stays. */
.gm-tabs { position: relative; display: grid; grid-template-columns: repeat(2, 1fr); width: min(280px, 100%); margin: 0 auto 26px; padding: 4px; background: #fff; border: 2px solid var(--line); border-radius: 999px; }
.gm-tabs::before { content: ""; position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc((100% - 8px) / 2); border-radius: 999px; background: var(--blue); box-shadow: 0 3px 0 var(--blue-lip); transition: transform .3s cubic-bezier(.3,1.3,.5,1); }
.gm-tabs[data-on="quiz"]::before { transform: translateX(100%); }
.gm-tabs button { position: relative; z-index: 1; border: 0; background: none; padding: 10px 0; font-family: inherit; font-size: .98rem; font-weight: 700; color: var(--muted); cursor: pointer; transition: color .2s; -webkit-tap-highlight-color: transparent; }
.gm-tabs button[aria-selected="true"] { color: var(--paper); }
.gm-tabs button:not([aria-selected="true"]):hover { color: var(--ink); }
.ln[hidden], .bn[hidden], .qzc[hidden] { display: none; }

/* Quiz tab card (links to the Bible quiz page) */
.qzc { max-width: 520px; margin: 0 auto; }
.qzc-card { background: #fff; border: 2px solid var(--line); border-bottom-width: 5px; border-radius: 24px; padding: 24px 20px; text-align: center; animation: rise .35s ease; }
.qzc-tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-bottom: 16px; }
.qzc-tags span { padding: 6px 12px; border-radius: 10px; background: var(--mist); font-size: .82rem; font-weight: 700; color: var(--blue); }
.qzc-text { font-size: 1.05rem; line-height: 1.5; color: var(--ink); margin-bottom: 14px; }
.qzc-last { margin-bottom: 16px; color: var(--muted); font-weight: 600; }
.qzc-last strong { color: var(--green-deep); }

/* Learn: stats strip */
.ln { max-width: 520px; margin: 0 auto; -webkit-user-select: none; user-select: none; }
.ln-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; background: #fff; border: 2px solid var(--line); border-radius: 20px; padding: 16px 10px; text-align: center; animation: rise .35s ease; }
.ln-stats b { display: block; font-size: 1.45rem; line-height: 1.1; color: var(--ink); font-variant-numeric: tabular-nums; }
.ln-stats b small { font-size: .9rem; color: var(--muted); }
.ln-stats span { display: block; font-size: .74rem; font-weight: 600; color: var(--muted); line-height: 1.25; margin-top: 2px; }
.ln-acc { text-align: center; margin-top: 10px; font-size: .88rem; font-weight: 600; color: var(--muted); }
.ln-review { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 14px; padding: 14px; border: 2px solid var(--red); border-bottom-width: 4px; border-radius: 16px; background: var(--red-bg); color: var(--red-deep); font-family: inherit; font-size: 1rem; font-weight: 700; cursor: pointer; }
.ln-review:active { transform: translateY(2px); border-bottom-width: 2px; margin-bottom: 2px; }

/* Learn: the path. Round lesson buttons that zigzag down, like a trail. */
.ln-path { list-style: none; display: flex; flex-direction: column; gap: 26px; margin: 34px 0 6px; padding: 0; }
.ln-node { position: relative; display: flex; align-items: center; gap: 16px; animation: rise .4s ease both; }
.ln-node:nth-child(2) { margin-left: 18%; animation-delay: .05s; }
.ln-node:nth-child(3) { margin-left: 30%; animation-delay: .1s; }
.ln-node:nth-child(4) { margin-left: 18%; animation-delay: .15s; }
.ln-node:nth-child(5) { animation-delay: .2s; }
.ln-dot { flex: none; width: 74px; height: 74px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; font-family: inherit; background: var(--blue); color: var(--paper); box-shadow: 0 6px 0 var(--blue-lip); transition: transform .08s ease, box-shadow .08s ease; -webkit-tap-highlight-color: transparent; }
.ln-dot b { font-size: 1.7rem; }
.ln-dot svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.ln-dot:active { transform: translateY(6px); box-shadow: 0 0 0 var(--blue-lip); }
.ln-node.now .ln-dot { animation: ln-ring 2s ease-out infinite; }
@keyframes ln-ring { 0% { box-shadow: 0 6px 0 var(--blue-lip), 0 0 0 0 rgba(201,164,92,.6); } 70%, 100% { box-shadow: 0 6px 0 var(--blue-lip), 0 0 0 18px rgba(201,164,92,0); } }
/* Green means done */
.ln-node.done .ln-dot { background: var(--green); color: #fff; box-shadow: 0 6px 0 var(--green-deep); }
.ln-node.done .ln-dot:active { box-shadow: 0 0 0 var(--green-deep); }
.ln-play .bar.full i { background: var(--green); }
.ln-node.locked .ln-dot { background: #E2DDD1; color: #A39C8C; box-shadow: 0 6px 0 #CFC8B8; cursor: default; }
.ln-node.locked .ln-dot:active { transform: none; box-shadow: 0 6px 0 #CFC8B8; }
.ln-name { display: flex; flex-direction: column; min-width: 0; }
.ln-name strong { font-size: 1.08rem; line-height: 1.25; color: var(--ink); }
.ln-name span { font-size: .85rem; font-weight: 600; color: var(--muted); }
.ln-node.locked .ln-name strong { color: #8F9AA8; }
/* "Start" bubble that bobs above the current lesson */
.ln-bubble { position: absolute; left: 37px; bottom: calc(100% + 6px); transform: translateX(-50%); padding: 6px 12px; border-radius: 10px; background: #fff; border: 2px solid var(--line); font-size: .78rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); white-space: nowrap; animation: ln-bob 1.6s ease-in-out infinite; }
.ln-bubble::after { content: ""; position: absolute; left: 50%; top: 100%; width: 10px; height: 10px; margin: -5px 0 0 -5px; background: #fff; border: 2px solid var(--line); border-top: 0; border-left: 0; transform: rotate(45deg); }
@keyframes ln-bob { 50% { transform: translate(-50%, -5px); } }
.ln-node.now { margin-top: 18px; }
/* Stars earned on a lesson */
.ln-stars { display: flex; gap: 3px; margin-top: 4px; }
/* Child selectors only: the confetti bits are <i> too and must not turn into stars */
.ln-stars > i, .ln-bigstars > i { display: block; background: #D9D2C3; clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%); }
.ln-stars > i { width: 16px; height: 16px; }
.ln-stars > i.on, .ln-bigstars > i.on { background: var(--gold); }

/* Lesson player: full screen, same look as the main quiz */
html.ln-open, html.ln-open body { overflow: hidden; }
.ln-play { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; background: var(--paper); animation: ln-in .28s ease; -webkit-user-select: none; user-select: none; }
@keyframes ln-in { from { opacity: 0; transform: translateY(24px); } }
.ln-count { flex: none; min-width: 40px; text-align: right; font-size: .9rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.ln-body .card { max-width: 600px; margin: 0 auto; }
.ln-opts { display: grid; gap: 12px; }
.ln-play .opt.right { animation: bn-pop .4s cubic-bezier(.3,1.6,.5,1); }
.ln-play .opt.wrong { animation: shake .3s ease; }
.ln-play .opt .mark { display: grid; }
.ln-play .opt:not(.right):not(.wrong) .mark { display: none; }
.ln-play .fb .verse strong { font-style: normal; white-space: nowrap; }
.ln-play .q-foot.bad .hint { color: var(--red-deep); }

/* Lesson end */
.ln-end { text-align: center; }
.ln-bigstars { position: relative; display: flex; justify-content: center; gap: 10px; margin: 10px 0 18px; }
.ln-bigstars > i { width: 58px; height: 58px; animation: trypop .45s cubic-bezier(.3,1.6,.5,1) both; }
.ln-bigstars > i:nth-child(1) { animation-delay: .15s; }
.ln-bigstars > i:nth-child(2) { animation-delay: .4s; position: relative; top: -10px; }
.ln-bigstars > i:nth-child(3) { animation-delay: .65s; }
.ln-end .q { margin-bottom: 8px; }
.ln-endsub { font-size: 1.1rem; color: var(--muted); font-weight: 600; margin-bottom: 22px; }
.ln-endstats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; background: #fff; border: 2px solid var(--line); border-radius: 20px; padding: 16px 8px; }
.ln-endstats b { display: block; font-size: 1.5rem; color: var(--ink); }
.ln-endstats span { font-size: .76rem; font-weight: 600; color: var(--muted); }
.ln-note { margin: 14px 0 20px; font-size: .9rem; color: var(--muted); line-height: 1.5; }
.ln-nextup { display: flex; flex-direction: column; gap: 2px; background: #fff; border: 2px dashed var(--gold); border-radius: 16px; padding: 14px 16px; }
.ln-nextup .bn-lbl { color: var(--gold); margin-bottom: 2px; }
.ln-nextup strong { font-size: 1.1rem; color: var(--ink); }
.ln-nextup span:last-child { font-size: .88rem; color: var(--muted); font-weight: 600; }

@media (min-width: 760px) {
  .ln-node:nth-child(2) { margin-left: 22%; }
  .ln-node:nth-child(3) { margin-left: 38%; }
  .ln-node:nth-child(4) { margin-left: 22%; }
}
@media (prefers-reduced-motion: reduce) {
  .ln *, .ln-play, .ln-play *, .gm-tabs::before { animation: none !important; transition: none !important; }
}

/* Memory verse: the card on the lesson end screen, and the tap-the-missing-words practice */
.ln-mem { position: relative; margin-top: 18px; background: #fff; border: 2px solid var(--gold); border-bottom-width: 5px; border-radius: 20px; padding: 18px 18px 20px; text-align: center; animation: rise .4s ease .3s both; transition: border-color .3s, background .3s; }
.ln-mem .bn-lbl { display: block; color: var(--gold); margin-bottom: 8px; }
.ln-mem-v { font-size: 1.12rem; line-height: 1.75; font-style: italic; color: var(--ink); }
.ln-mem cite { display: block; margin: 6px 0 14px; font-style: normal; font-weight: 700; font-size: .9rem; color: var(--ink); }
.ln-mem .btn { animation-delay: .8s; }
/* A gap hides its word behind an underline until filled. The next one to fill glows gold. */
.gap { display: inline-block; min-width: 3.2em; color: transparent; border-bottom: 3px solid var(--line-dark); line-height: 1.3; font-style: normal; font-weight: 700; text-align: center; transition: color .2s, border-color .2s; }
.gap.next { border-color: var(--gold); animation: breathe 1.2s ease-in-out infinite; }
.gap.filled { min-width: 0; color: var(--green-deep); border-color: var(--green); animation: trypop .35s cubic-bezier(.3,1.6,.5,1); }
.ln-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 4px; }
.chip { min-height: 46px; padding: 0 18px; border: 2px solid var(--line); border-bottom-width: 4px; border-radius: 14px; background: #fff; font-family: inherit; font-size: 1.02rem; font-weight: 700; color: var(--ink); cursor: pointer; animation: dtpulse 2.4s ease-out 1s infinite; transition: opacity .2s, transform .06s; -webkit-tap-highlight-color: transparent; }
.chip:hover { border-color: var(--line-dark); }
.chip:active { transform: translateY(2px); border-bottom-width: 2px; margin-bottom: 2px; }
.chip.used { display: none; } /* gone from the row, so the rest close up */
.chip.nope { border-color: var(--red); color: var(--red-deep); animation: shake .3s ease; }
.chip.fade { opacity: .35; animation: none; }
.ln-mem-msg { min-height: 1.4em; margin-top: 12px; font-size: .98rem; color: var(--green-deep); }
.ln-mem.won { border-color: var(--green); background: var(--green-bg); }
.ln-mem.won .ln-chips { display: none; }
/* On the path: practice a finished lesson's verse */
.ln-memo { align-self: flex-start; margin-top: 8px; padding: 7px 12px; border: 2px solid var(--gold); border-radius: 10px; background: #fff; font-family: inherit; font-size: .82rem; font-weight: 700; color: var(--ink); cursor: pointer; animation: dtpulse 2.4s ease-out 1.5s infinite; }
.ln-memo.got { border-color: var(--green); color: var(--green-deep); background: var(--green-bg); animation: none; }
/* A mistake along the way: gold "almost" state with a Review button */
.ln-mem.almost { border-color: var(--gold); background: #FFF8E6; }
.ln-mem.almost .ln-chips { display: none; }
.ln-mem.almost .ln-mem-msg { color: var(--ink); }
.ln-mem-again { display: flex; margin: 14px auto 0; }
.ln-endstats b.bump { color: var(--green); animation: trypop .45s cubic-bezier(.3,1.6,.5,1); }
.ln-mem.won .bn-lbl { color: var(--green-deep); }
