/* Bible quiz page, built like a game: level + XP, topic tiles, a play sheet, book select, the full screen player, results.
   The player reuses the main quiz pieces (.q-top, .bar, .opt, .q-foot, .fb) from styles.css. */
.qz { display: flex; flex-direction: column; max-width: 620px; margin: 0 auto; }
.qz-view { animation: rise .3s ease; }
.qz .bn-lbl, .qz-play .bn-lbl, .qz-sheet .bn-lbl { display: block; font-size: .74rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }

/* ===== Navigation: app-style bar at the bottom on phones, tabs at the top on desktop ===== */
.qz-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(3, 1fr); background: rgba(255,253,248,.96); border-top: 2px solid var(--line); padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.qz-nav button { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 6px 0; border: 0; background: none; border-radius: 14px; font-family: inherit; font-size: .78rem; font-weight: 700; color: #8F9AA8; cursor: pointer; -webkit-tap-highlight-color: transparent; transition: color .15s; }
.qz-nav svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s cubic-bezier(.3,1.6,.5,1); }
.qz-nav button[data-view="play"] svg { fill: currentColor; stroke: none; }
.qz-nav button[aria-current] { color: var(--blue); }
.qz-nav button[aria-current] svg { transform: translateY(-2px) scale(1.1); }
.qz-nav button:active svg { transform: scale(.9); }
body.has-qz-nav { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
@media (min-width: 760px) {
  .qz-nav { position: static; order: -1; width: 420px; margin: 0 auto 22px; padding: 5px; background: #fff; border: 2px solid var(--line); border-radius: 999px; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .qz-nav button { flex-direction: row; justify-content: center; gap: 8px; padding: 10px 0; border-radius: 999px; font-size: .95rem; }
  .qz-nav svg { width: 20px; height: 20px; }
  .qz-nav button[aria-current] { background: var(--blue); color: var(--paper); box-shadow: 0 3px 0 var(--blue-lip); }
  .qz-nav button[aria-current] svg { transform: none; }
  .qz-nav button:not([aria-current]):hover { color: var(--ink); }
  body.has-qz-nav { padding-bottom: 0; }
}

/* ===== Level + XP (gold = reward) and the day streak ===== */
.qz-level { display: flex; align-items: center; gap: 14px; background: #fff; border: 2px solid var(--line); border-bottom-width: 5px; border-radius: 22px; padding: 14px 16px; }
.qz-badge { position: relative; flex: none; width: 56px; height: 56px; border-radius: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; background: linear-gradient(160deg, #E3C88E, #C9A45C); color: var(--blue-deep); box-shadow: 0 4px 0 #A8853F; transform: rotate(-4deg); }
/* Rank tiers by questions right (Bronze 0, Silver 50, Gold 200, Platinum 500, Diamond 1,000, Champion 5,000) */
.qz-badge.t-bronze { background: linear-gradient(160deg, #E8B68A, #B8733D); box-shadow: 0 4px 0 #8A5526; }
.qz-badge.t-silver { background: linear-gradient(160deg, #F1F3F6, #B4BCC7); box-shadow: 0 4px 0 #8790A0; }
.qz-badge.t-platinum { background: linear-gradient(160deg, #E2F4F4, #93C6CC); box-shadow: 0 4px 0 #5F959C; }
.qz-badge.t-diamond { background: linear-gradient(160deg, #DDEBFF, #7AA9F0); box-shadow: 0 4px 0 #4A78BF; }
.qz-level { flex-wrap: wrap; row-gap: 12px; }
.qz-level .qz-xp-top { flex-wrap: wrap; row-gap: 2px; }
.qz-level .qz-xp-top strong, .qz-level .qz-xp-top span { white-space: nowrap; }
.qz-badge.t-champion { background: linear-gradient(160deg, #B9A0F7, #6D44CF); box-shadow: 0 4px 0 #4B2C9A; color: #fff; }
.qz-tier { display: inline-block; padding: 3px 9px; border-radius: 999px; font-style: normal; font-size: .68rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; vertical-align: 2px; background: var(--gold-soft); color: #7A5B1E; }
.qz-tier.t-bronze { background: #F6E3D2; color: #7A4A22; }
.qz-tier.t-silver { background: #ECEFF3; color: #555E6B; }
.qz-tier.t-platinum { background: #DDF0F1; color: #3E6E74; }
.qz-tier.t-diamond { background: #DFEAFD; color: #33589A; }
.qz-tier.t-champion { background: #EAE1FD; color: #5532A8; }
.qz-lvstats { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding-top: 10px; border-top: 2px dashed var(--line); font-size: .8rem; white-space: nowrap; font-weight: 600; color: var(--muted); }
.qz-lvstats b { color: var(--ink); font-variant-numeric: tabular-nums; }
.qz-showoff { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 14px; }
.qz-badge small { font-size: .6rem; font-weight: 800; letter-spacing: .12em; line-height: 1; }
.qz-badge b { font-size: 1.6rem; line-height: 1; }
.qz-xp { flex: 1; min-width: 0; }
.qz-xp-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.qz-xp-top strong { font-size: 1.05rem; color: var(--ink); }
.qz-xp-top span { font-size: .82rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.qz-xpbar { height: 12px; border-radius: 6px; background: #ECE6D9; overflow: hidden; }
.qz-xpbar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #E3C88E, #C9A45C); transition: width .7s cubic-bezier(.3,.9,.4,1); }
.qz-xpbar.big { height: 16px; border-radius: 8px; }
.qz-streak { flex: none; display: flex; flex-direction: column; align-items: center; min-width: 40px; filter: grayscale(1); opacity: .6; }
.qz-streak span { font-size: 1.4rem; line-height: 1.1; }
.qz-streak b { font-size: .95rem; color: var(--ink); }
.qz-streak.on { filter: none; opacity: 1; }

/* ===== Topic tiles: the game select grid ===== */
.qz-h { margin: 26px 0 12px; font-size: 1.35rem; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
.qz-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; min-height: 120px; }
.qz-tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 118px; padding: 14px 6px 12px; border: 2px solid rgba(20,42,70,.08); border-bottom-width: 5px; border-radius: 20px; background: #fff; font-family: inherit; color: var(--ink); cursor: pointer; animation: qz-tile-in .4s cubic-bezier(.3,1.4,.5,1) both; transition: transform .08s, border-color .12s; -webkit-tap-highlight-color: transparent; }
@keyframes qz-tile-in { from { opacity: 0; transform: translateY(10px) scale(.94); } }
.qz-tile:hover { border-color: rgba(20,42,70,.18); }
.qz-tile:active { transform: translateY(3px); border-bottom-width: 2px; margin-bottom: 3px; }
.qz-tile .em { font-size: 2rem; line-height: 1; margin-bottom: 4px; transition: transform .2s cubic-bezier(.3,1.6,.5,1); }
.qz-tile:hover .em { transform: scale(1.12) rotate(-6deg); }
.qz-tile strong { font-size: .95rem; line-height: 1.15; text-align: center; }
.qz-tile small { font-size: .74rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.qz-tile.c1 { background: #E8EEF3; } .qz-tile.c2 { background: #FBF1DC; } .qz-tile.c3 { background: #EFE9F8; }
.qz-tile.c4 { background: #FDEBDD; } .qz-tile.c5 { background: #E3F0FB; } .qz-tile.c6 { background: #FBE7EC; }
.qz-tile.c7 { background: #F1EEE6; } .qz-tile.c8 { background: #E6F2EF; } .qz-tile.c9 { background: #FFF4D6; }
.qz-tile.locked { cursor: default; opacity: .55; filter: grayscale(.6); }
.qz-tile.locked .em svg { width: 28px; height: 28px; fill: none; stroke: #8F9AA8; stroke-width: 2.2; stroke-linecap: round; }
.qz-tile.locked:active { transform: none; border-bottom-width: 5px; margin-bottom: 0; }
/* Progress ring (green = done) */
.qz-ring { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; transform: rotate(-90deg); }
.qz-ring circle { fill: none; stroke: rgba(20,42,70,.1); stroke-width: 5; }
.qz-ring circle.v { stroke: var(--green); stroke-linecap: round; }

/* Resume card (gold = waiting for you) */
.qz-resume { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding: 16px 16px 16px 18px; background: #FFF8E6; border: 2px dashed var(--gold); border-radius: 20px; animation: rise .35s ease; }
.qz-resume > div:first-child { display: flex; flex-direction: column; min-width: 0; }
.qz-resume .bn-lbl { color: #8A6A12; margin-bottom: 2px; }
.qz-resume strong { font-size: 1.05rem; color: var(--ink); line-height: 1.3; }
.qz-resume span:last-child { font-size: .88rem; font-weight: 600; color: var(--muted); }
.qz-resume-btns { display: flex; align-items: center; gap: 6px; flex: none; }
.qz-resume .btn { min-height: 46px; padding: 0 18px; font-size: .98rem; }
.qz-drop { width: 36px; height: 36px; border: 0; border-radius: 10px; background: none; font-size: 1.5rem; line-height: 1; color: #A39C8C; cursor: pointer; }
.qz-drop:hover { background: rgba(0,0,0,.05); color: var(--ink); }

/* Review missed (red = missed) */
.ln-review { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; margin-top: 16px; 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; }

/* ===== Books: testament switch + a grid of book tiles ===== */
.qz-sub { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.qz-sub h2 { font-size: 1.4rem; font-weight: 700; letter-spacing: -0.01em; }
.qz-back { min-height: 40px; padding: 0 12px; border: 2px solid var(--line); border-radius: 12px; background: #fff; font-family: inherit; font-size: .92rem; font-weight: 700; color: var(--ink); cursor: pointer; }
.qz-back:hover { border-color: var(--line-dark); }
.qz-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 14px; background: #fff; border: 2px solid var(--line); border-radius: 999px; }
.qz-seg button { padding: 10px 0; border: 0; border-radius: 999px; background: none; font-family: inherit; font-size: .95rem; font-weight: 700; color: var(--muted); cursor: pointer; }
.qz-seg button[aria-pressed="true"] { background: var(--blue); color: var(--paper); box-shadow: 0 3px 0 var(--blue-lip); }
.qz-books { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.qz-book-tile { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 74px; padding: 10px 4px; border: 2px solid var(--line); border-bottom-width: 4px; border-radius: 16px; background: #fff; font-family: inherit; color: var(--ink); cursor: pointer; animation: qz-tile-in .35s ease both; -webkit-tap-highlight-color: transparent; }
.qz-book-tile strong { font-size: .88rem; line-height: 1.15; text-align: center; }
.qz-book-tile small { font-size: .72rem; font-weight: 700; color: var(--green-deep); }
.qz-book-tile .qz-ring { top: 6px; right: 6px; width: 18px; height: 18px; }
.qz-book-tile:active { transform: translateY(2px); border-bottom-width: 2px; margin-bottom: 2px; }
.qz-book-tile.locked { cursor: default; background: #F6F2EA; color: #A39C8C; }
.qz-book-tile.locked:active { transform: none; border-bottom-width: 4px; margin-bottom: 0; }
.qz-book-tile .lk svg { width: 14px; height: 14px; fill: none; stroke: #B9B2A2; stroke-width: 2.4; stroke-linecap: round; }
@media (min-width: 760px) { .qz-books { grid-template-columns: repeat(4, minmax(0, 1fr)); } .qz-tiles { gap: 14px; } .qz-tile { min-height: 132px; } }

/* ===== The play sheet: slides up from the bottom on phones, a centered card on desktop ===== */
html.qz-sheet-open, html.qz-sheet-open body { overflow: hidden; }
.qz-sheet-wrap { position: fixed; inset: 0; z-index: 55; display: flex; align-items: flex-end; justify-content: center; background: rgba(14,31,53,.45); animation: qz-fade .2s ease; }
@keyframes qz-fade { from { opacity: 0; } }
.qz-sheet { width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto; background: var(--paper); border-radius: 26px 26px 0 0; padding: 10px 20px calc(20px + env(safe-area-inset-bottom)); animation: qz-up .32s cubic-bezier(.2,.9,.3,1.05); }
@keyframes qz-up { from { transform: translateY(100%); } }
.qz-grab { width: 44px; height: 5px; border-radius: 3px; background: var(--line-dark); margin: 0 auto 12px; }
.qz-sheet-h { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.qz-sheet-h .em { font-size: 2.1rem; line-height: 1; }
.qz-sheet-h > div { flex: 1; display: flex; flex-direction: column; }
.qz-sheet-h strong { font-size: 1.35rem; color: var(--ink); line-height: 1.2; }
.qz-sheet-h small { font-size: .88rem; font-weight: 600; color: var(--muted); }
.qz-gear, .qz-shx { flex: none; width: 42px; height: 42px; display: grid; place-items: center; border: 2px solid var(--line); border-radius: 12px; background: #fff; color: var(--muted); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.qz-gear svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .4s ease; }
.qz-gear[aria-expanded="true"] { color: var(--blue); border-color: var(--blue); }
.qz-gear[aria-expanded="true"] svg { transform: rotate(90deg); }
.qz-helpers { margin-bottom: 8px; padding: 6px 14px; background: #fff; border: 2px solid var(--line); border-radius: 16px; animation: rise .25s ease; }
.qz-lbl { margin: 14px 0 8px; font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.qz-diffs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.qz-diff { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 4px; border: 2px solid var(--line); border-bottom-width: 4px; border-radius: 16px; background: #fff; font-family: inherit; color: var(--ink); cursor: pointer; transition: transform .06s, background .12s, border-color .12s; -webkit-tap-highlight-color: transparent; }
.qz-diff b { font-size: .98rem; }
.qz-diff small { font-size: .72rem; font-weight: 700; color: var(--muted); }
.qz-diff:active { transform: translateY(2px); border-bottom-width: 2px; margin-bottom: 2px; }
.qz-diff:disabled { opacity: .4; cursor: default; }
.qz-diff.d1[aria-pressed="true"] { background: var(--green-bg); border-color: var(--green); }
.qz-diff.d2[aria-pressed="true"] { background: var(--gold-soft); border-color: var(--gold); }
.qz-diff.d3[aria-pressed="true"] { background: var(--red-bg); border-color: var(--red); }
.qz-diff.dramp[aria-pressed="true"] { background: var(--blue); border-color: var(--blue-lip); color: var(--paper); }
.qz-diff.dramp[aria-pressed="true"] small { color: rgba(255,253,248,.75); }
.qz-step { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px; background: #fff; border: 2px solid var(--line); border-radius: 16px; }
.qz-step button { width: 48px; height: 44px; border: 0; border-radius: 12px; background: var(--mist); font-family: inherit; font-size: 1.5rem; font-weight: 700; color: var(--blue); cursor: pointer; }
.qz-step button:active { transform: scale(.94); }
.qz-step output { font-size: 1.1rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.qz-range { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qz-range label { display: flex; flex-direction: column; gap: 4px; font-size: .78rem; font-weight: 700; color: var(--muted); }
.qz-range select { min-height: 44px; padding: 0 10px; border: 2px solid var(--line); border-radius: 12px; background: #fff; font-family: inherit; font-size: 1rem; font-weight: 600; color: var(--ink); }
.qz-play-btn { width: 100%; margin-top: 18px; min-height: 60px; font-size: 1.2rem; letter-spacing: .08em; }
.qz-play-btn:disabled { opacity: .5; animation: none; }
@media (min-width: 760px) {
  .qz-sheet-wrap { align-items: center; }
  .qz-sheet { border-radius: 26px; animation: qz-pop-in .28s cubic-bezier(.2,.9,.3,1.1); }
  .qz-grab { display: none; }
}
@keyframes qz-pop-in { from { opacity: 0; transform: scale(.94); } }

/* Switches (green = on) */
.qz-sw { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 10px 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.qz-sw + .qz-sw { border-top: 2px solid var(--line); }
.qz-sw span { display: flex; flex-direction: column; }
.qz-sw strong { font-size: .98rem; color: var(--ink); }
.qz-sw small { font-size: .8rem; color: var(--muted); line-height: 1.35; }
.qz-sw input { position: absolute; opacity: 0; pointer-events: none; }
.qz-sw i { position: relative; flex: none; width: 52px; height: 30px; border-radius: 999px; background: #D9D2C3; transition: background .2s; }
.qz-sw i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.15); transition: transform .25s cubic-bezier(.3,1.4,.5,1); }
.qz-sw input:checked + i { background: var(--green); }
.qz-sw input:checked + i::after { transform: translateX(22px); }
.qz-sw input:focus-visible + i { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ===== Progress + Awards (placeholders for now) ===== */
.qz-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; margin-top: 14px; background: #fff; border: 2px solid var(--line); border-radius: 20px; padding: 16px 10px; text-align: center; }
.qz-stats b { display: block; font-size: 1.45rem; line-height: 1.1; color: var(--ink); font-variant-numeric: tabular-nums; }
.qz-stats span { display: block; font-size: .74rem; font-weight: 600; color: var(--muted); line-height: 1.25; margin-top: 2px; }
.qz-soonview { margin-top: 14px; text-align: center; background: #fff; border: 2px dashed var(--line-dark); border-radius: 24px; padding: 34px 22px; }
.qz-soonview .ic { display: inline-grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; background: var(--mist); color: var(--blue); margin-bottom: 14px; }
.qz-soonview svg { width: 32px; height: 32px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.qz-soonview h2 { font-size: 1.5rem; margin-bottom: 8px; }
.qz-soonview p { color: var(--muted); line-height: 1.55; max-width: 34ch; margin: 0 auto 14px; }
.qz-soonview .bn-lbl { color: var(--gold); }

/* ===== Bible map (green = done). Each book cell fills up from the bottom as its chapters are done. ===== */
.qz-maptop { display: flex; align-items: center; gap: 14px; position: relative; background: #fff; border: 2px solid var(--line); border-bottom-width: 5px; border-radius: 22px; padding: 14px 16px; }
.qz-bigring { flex: none; width: 84px; height: 84px; transform: rotate(-90deg); }
.qz-bigring circle { fill: none; stroke: #ECE6D9; stroke-width: 11; }
.qz-bigring circle.v { stroke: var(--green); stroke-linecap: round; animation: qz-ringin 1s cubic-bezier(.3,.9,.4,1) .15s both; }
@keyframes qz-ringin { from { stroke-dasharray: 0 999; } }
.qz-maptop-n { position: absolute; left: 16px; width: 84px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.qz-maptop-n b { font-size: 1.25rem; line-height: 1; color: var(--ink); font-variant-numeric: tabular-nums; }
.qz-maptop-n span { font-size: .62rem; font-weight: 700; color: var(--muted); margin-top: 2px; }
.qz-maptop-t { display: grid; gap: 6px; font-size: .95rem; color: var(--muted); font-weight: 600; }
.qz-maptop-t b { color: var(--green-deep); font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.qz-shelf { margin-top: 14px; background: #fff; border: 2px solid var(--line); border-radius: 20px; padding: 14px 12px; }
.qz-shelf-h { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin: 0 2px 10px; }
.qz-shelf-h strong { font-size: 1.02rem; color: var(--ink); }
.qz-shelf-h span { font-size: .8rem; font-weight: 700; color: var(--muted); }
.qz-cells { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.qz-cell { position: relative; overflow: hidden; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 48px; padding: 4px 2px; border: 2px solid var(--line); border-bottom-width: 4px; border-radius: 12px; background: #fff; font-family: inherit; color: var(--ink); -webkit-tap-highlight-color: transparent; }
button.qz-cell { cursor: pointer; border-color: rgba(20,42,70,.16); }
button.qz-cell:hover { border-color: var(--green); }
button.qz-cell:active { transform: translateY(2px); border-bottom-width: 2px; margin-bottom: 2px; }
.qz-cell i { position: absolute; left: 0; right: 0; bottom: 0; height: var(--p); background: var(--green-bg); animation: qz-fill .8s cubic-bezier(.3,.9,.4,1) both; }
@keyframes qz-fill { from { height: 0; } }
.qz-cell b, .qz-cell small { position: relative; }
.qz-cell b { font-size: .8rem; line-height: 1.1; }
.qz-cell small { font-size: .64rem; font-weight: 700; color: var(--green-deep); font-variant-numeric: tabular-nums; }
.qz-cell.started { border-color: rgba(47,143,78,.45); }
.qz-cell.full { background: var(--green); border-color: var(--green-deep); color: #fff; }
.qz-cell.full i { display: none; }
.qz-cell.full small { color: #fff; }
.qz-cell.soon { background: #F6F2EA; border-style: dashed; border-bottom-width: 2px; color: #B3AB9A; }
.qz-legend { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; margin-top: 12px; font-size: .78rem; font-weight: 600; color: var(--muted); }
.qz-legend span { display: inline-flex; align-items: center; gap: 6px; }
.qz-legend i { width: 14px; height: 14px; border-radius: 4px; border: 2px solid rgba(20,42,70,.16); background: #fff; }
.qz-legend i.full { background: var(--green); border-color: var(--green-deep); }
.qz-legend i.started { background: var(--green-bg); border-color: rgba(47,143,78,.45); }
.qz-legend i.soon { background: #F6F2EA; border-style: dashed; border-color: var(--line-dark); }
/* One book: every chapter as a square */
.qz-chs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.qz-ch { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 50px; border: 2px solid rgba(20,42,70,.16); border-bottom-width: 4px; border-radius: 12px; background: #fff; font-family: inherit; font-size: 1rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; animation: qz-tile-in .35s ease both; -webkit-tap-highlight-color: transparent; }
button.qz-ch { cursor: pointer; }
button.qz-ch:hover { border-color: var(--green); }
button.qz-ch:active { transform: translateY(2px); border-bottom-width: 2px; margin-bottom: 2px; }
.qz-ch small { font-size: .62rem; font-weight: 700; color: var(--muted); line-height: 1; }
.qz-ch.started { background: var(--green-bg); border-color: rgba(47,143,78,.45); }
.qz-ch.started small { color: var(--green-deep); }
.qz-ch.full { background: var(--green); border-color: var(--green-deep); color: #fff; }
.qz-ch.soon { background: #F6F2EA; border-style: dashed; border-bottom-width: 2px; color: #C2BBAA; font-weight: 600; }
.qz-chnote { margin-top: 10px; font-size: .84rem; color: var(--muted); text-align: center; }
@media (min-width: 760px) {
  .qz-cells { grid-template-columns: repeat(8, minmax(0, 1fr)); }
  .qz-chs { grid-template-columns: repeat(10, minmax(0, 1fr)); }
}

/* ===== Awards: compact list. Up next (gray icon, green progress bar), Completed (green row, check). Gold NEW tag = just earned. ===== */
.qz-asum { padding: 14px 16px; background: #fff; border: 2px solid var(--line); border-bottom-width: 5px; border-radius: 20px; }
.qz-asumbar i { background: var(--green); }
.qz-hn { display: inline-grid; place-items: center; min-width: 28px; height: 24px; padding: 0 8px; margin-left: 4px; border-radius: 999px; background: var(--green); color: #fff; font-size: .82rem; vertical-align: 3px; }
.qz-alist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.qz-arow { display: flex; align-items: center; gap: 12px; padding: 10px 12px; background: #fff; border: 2px solid var(--line); border-radius: 16px; animation: rise .3s ease both; }
.qz-arow .qz-bic { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: #F1EEE6; font-size: 1.35rem; line-height: 1; }
.qz-arow:not(.on) .qz-bic { filter: grayscale(1); opacity: .5; }
.qz-amid { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.qz-amid strong { font-size: .96rem; line-height: 1.25; color: var(--ink); }
.qz-amid small { font-size: .8rem; line-height: 1.3; color: var(--muted); }
.qz-bprog { display: block; height: 6px; margin-top: 6px; border-radius: 3px; background: #ECE6D9; overflow: hidden; }
.qz-bprog i { display: block; height: 100%; border-radius: 3px; background: var(--green); }
.qz-bnum { flex: none; min-width: 48px; text-align: right; font-size: .85rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.qz-arow.on { background: var(--green-bg); border-color: rgba(47,143,78,.45); }
.qz-arow.on .qz-bic { background: #fff; box-shadow: 0 0 0 2px var(--green); }
.qz-arow.on small { color: var(--green-deep); }
.qz-acheck { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--green); color: #fff; font-size: 1rem; font-weight: 800; }
.qz-arow.new { border-color: var(--gold); }
.qz-arow.new.go .qz-bic { animation: qz-wiggle 1.2s ease .1s 2; } /* .go is added once the award is on screen (quiz.js celebrateNew) */
.qz-newtag { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 999px; background: linear-gradient(90deg, #E3C88E, #C9A45C); color: var(--blue-deep); font-size: .62rem; font-weight: 800; letter-spacing: .08em; vertical-align: 2px; }
@keyframes qz-wiggle { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-10deg) scale(1.08); } 40% { transform: rotate(8deg) scale(1.08); } 60% { transform: rotate(-4deg); } }
.qz-arow[hidden] { display: none; }
.qz-amore { display: block; width: 100%; margin-top: 6px; padding: 12px; border: 2px dashed var(--line-dark); border-radius: 16px; background: none; font-family: inherit; font-size: .95rem; font-weight: 700; color: var(--blue); cursor: pointer; }
.qz-amore:hover { border-color: var(--blue); }
.qz-aempty { padding: 16px; text-align: center; color: var(--muted); background: #fff; border: 2px dashed var(--line-dark); border-radius: 16px; }
.qz-nav button { position: relative; }
.qz-newdot { position: absolute; top: 4px; right: calc(50% - 22px); width: 10px; height: 10px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 2px var(--paper); }
@media (min-width: 760px) { .qz-newdot { top: 8px; right: 14px; } }
/* Results: awards unlocked by this quiz */
.qz-unlock { margin-bottom: 12px; padding: 14px 16px; background: #FFF8E6; border: 2px solid var(--gold); border-bottom-width: 5px; border-radius: 20px; text-align: left; animation: qz-card-pop .6s cubic-bezier(.3,1.6,.5,1) .9s both; }
.qz-unlock .bn-lbl { color: #8A6A12; margin-bottom: 8px; }
.qz-unlock-row { display: flex; align-items: center; gap: 12px; }
.qz-unlock-row + .qz-unlock-row { margin-top: 8px; }
.qz-unlock-row .qz-bic { flex: none; display: grid; place-items: center; border-radius: 50%; line-height: 1; width: 46px; height: 46px; margin: 0; font-size: 1.5rem; background: var(--green-bg); box-shadow: 0 0 0 3px var(--green); }
.qz-unlock-row strong { display: block; color: var(--ink); }
.qz-unlock-row small { color: var(--muted); font-size: .84rem; }

/* ===== Settings (red = erase, the only destructive thing here) ===== */
.qz-setbtn { width: 40px; height: 40px; margin-left: -4px; }
.qz-card { padding: 6px 16px; background: #fff; border: 2px solid var(--line); border-radius: 18px; }
.qz-backup, .qz-danger { padding: 16px; }
.qz-backup p, .qz-danger p { color: var(--muted); line-height: 1.5; margin-bottom: 12px; }
.qz-backup .btn { width: 100%; }
.qz-paste { display: flex; flex-direction: column; gap: 6px; margin-top: 16px; padding-top: 14px; border-top: 2px solid var(--line); }
.qz-paste strong { font-size: .95rem; color: var(--ink); }
.qz-paste textarea { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 2px solid var(--line); border-radius: 12px; background: var(--paper); font-family: inherit; font-size: 16px; color: var(--ink); resize: vertical; word-break: break-all; }
.qz-paste textarea:focus { outline: none; border-color: var(--blue); }
.qz-restore { width: 100%; margin-top: 10px; }
.qz-restore.armed { border-color: var(--gold); background: #FFF8E6; }
.qz-setnote { min-height: 0; margin: 8px 0 0 !important; font-size: .88rem; font-weight: 700; color: var(--green-deep) !important; }
.qz-setnote:empty { display: none; }
.qz-setnote.warn { color: #8A6A12 !important; }
.qz-setnote.bad { color: var(--red-deep) !important; }
.qz-erase { width: 100%; min-height: 48px; border: 2px solid var(--red); border-bottom-width: 4px; border-radius: 16px; background: #fff; font-family: inherit; font-size: 1rem; font-weight: 700; color: var(--red-deep); cursor: pointer; }
.qz-erase[hidden], .qz-erase-ask[hidden] { display: none; }
.qz-erase-ask { display: grid; gap: 10px; }
.qz-erase-ask label { font-size: .95rem; line-height: 1.45; color: var(--red-deep); }
.qz-erase-ask input { width: 100%; min-height: 48px; padding: 0 14px; border: 2px solid var(--red); border-radius: 14px; font: inherit; font-size: 16px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); background: #fff; }
.qz-erase-ask input:focus { outline: 3px solid var(--red-bg); }
.qz-erase-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qz-erase-go { min-height: 48px; border: 2px solid var(--red-deep); border-bottom-width: 4px; border-radius: 16px; background: var(--red); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.qz-erase-go:disabled { opacity: .4; cursor: default; }
.qz-erase-go:not(:disabled):active { transform: translateY(2px); border-bottom-width: 2px; margin-bottom: 2px; }
.qz-erase:active, .qz-restore:active { transform: translateY(2px); border-bottom-width: 2px; margin-bottom: 2px; }
.qz-undo { display: block; margin: 16px auto 0; padding: 10px 16px; border: 0; background: none; font-family: inherit; font-size: .95rem; font-weight: 700; color: var(--blue); text-decoration: underline; cursor: pointer; }

/* ===== Daily Challenge + Challenge a friend (gold = waiting for you, green = done or won) ===== */
.qz-daily, .qz-vs-in { margin-top: 14px; padding: 16px; background: #fff; border: 2px solid var(--gold); border-bottom-width: 5px; border-radius: 22px; animation: rise .35s ease; }
.qz-vs-in { background: #FFF8E6; border-style: dashed; border-bottom-width: 2px; }
.qz-daily.done { border-color: rgba(47,143,78,.45); background: var(--green-bg); }
.qz-daily-top, .qz-vs-top { display: flex; align-items: flex-start; gap: 12px; }
.qz-daily-top > div, .qz-vs-top > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.qz-vs-ic { flex: none; font-size: 2rem; line-height: 1.1; }
.qz-daily .bn-lbl, .qz-vs-in .bn-lbl { color: #8A6A12; margin-bottom: 2px; }
.qz-daily.done .bn-lbl { color: var(--green-deep); }
.qz-daily strong, .qz-vs-in strong { font-size: 1.15rem; color: var(--ink); line-height: 1.3; }
.qz-daily-top span:not(.bn-lbl):not(.qz-vs-ic), .qz-vs-top span:not(.bn-lbl):not(.qz-vs-ic) { font-size: .9rem; font-weight: 600; color: var(--muted); }
.qz-grid { font-size: 1.1rem !important; letter-spacing: 1px; margin: 2px 0; }
.qz-daily .qz-play-btn, .qz-vs-in .qz-play-btn { margin-top: 12px; min-height: 52px; font-size: 1.05rem; }
.qz-daily-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.qz-daily-btns .qz-again { min-height: 44px; font-size: .92rem; }
/* Results: head to head */
.qz-vs { margin-bottom: 12px; padding: 16px; background: #fff; border: 2px solid var(--line); border-bottom-width: 5px; border-radius: 20px; text-align: left; }
.qz-vs.win { border-color: var(--green); background: var(--green-bg); }
.qz-vs.tie { border-color: var(--gold); }
.qz-vs-v { display: block; margin-bottom: 10px; font-size: 1.25rem; color: var(--ink); text-align: center; }
.qz-vs.win .qz-vs-v { color: var(--green-deep); }
.qz-vs-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 2px 10px; padding: 8px 0; }
.qz-vs-row + .qz-vs-row { border-top: 2px solid var(--line); }
.qz-vs-row span { font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qz-vs-row b { font-size: 1.2rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.qz-vs-row i { grid-column: 1 / -1; font-style: normal; font-size: .95rem; letter-spacing: 1px; }
.qz-sendvs { margin-top: 14px; padding: 16px; background: #FFF8E6; border: 2px dashed var(--gold); border-radius: 20px; display: grid; gap: 10px; }
.qz-sendvs p { font-weight: 600; color: var(--ink); }
.qz-nm { display: grid; gap: 10px; text-align: left; animation: rise .25s ease; }
.qz-nm label { display: flex; flex-direction: column; gap: 4px; }
.qz-nm strong { color: var(--ink); }
.qz-nm small { font-size: .82rem; color: var(--muted); }
.qz-nm input { min-height: 46px; padding: 0 12px; border: 2px solid var(--line); border-radius: 12px; background: #fff; font-family: inherit; font-size: 16px; color: var(--ink); }
.qz-nm input:focus { outline: none; border-color: var(--blue); }
.qz-play .qz-nm, .qz-play input { -webkit-user-select: text; user-select: text; }

/* ===== Player ===== */
html.qz-open, html.qz-open body { overflow: hidden; }
.qz-play { position: fixed; inset: 0; z-index: 60; display: flex; flex-direction: column; background: var(--paper); animation: qz-in .28s ease; -webkit-user-select: none; user-select: none; }
@keyframes qz-in { from { opacity: 0; transform: translateY(24px); } }
.qz-count { flex: none; min-width: 44px; text-align: right; font-size: .9rem; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; }
.qz-play .bar.full i { background: var(--green); }
.qz-body .card { max-width: 600px; margin: 0 auto; }
.qz-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.qz-d, .qz-ref { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 11px; font-size: .95rem; font-weight: 700; letter-spacing: .02em; }
.qz-d.d1 { background: var(--green-bg); color: var(--green-deep); } /* Easy = green (Ethan 2026-11-05) */
.qz-d.d2 { background: var(--gold-soft); color: #8A6A12; }
.qz-d.d3 { background: var(--red-bg); color: var(--red-deep); }
.qz-ref { background: #fff; border: 2px solid var(--line); color: var(--ink); }
.qz-ref.is-verse { border-color: var(--gold); }
.ln-opts { display: grid; gap: 12px; }
.ln-opts[hidden] { display: none; }
.qz-play .opt .mark { display: grid; }
.qz-play .opt:not(.right):not(.wrong) .mark { display: none; }
.qz-play .opt.right { animation: qz-pop .4s cubic-bezier(.3,1.6,.5,1); }
.qz-play .opt.wrong { animation: shake .3s ease; }
@keyframes qz-pop { 45% { transform: scale(1.03); } }
.qz-play .fb .verse strong { font-style: normal; white-space: nowrap; }
.qz-play .fb .verse.is-loading .v-txt { opacity: .6; }
.qz-play .fb .verse .v-esv { font-style: normal; font-size: .8em; font-weight: 700; color: inherit; opacity: .7; text-decoration: underline; text-underline-offset: 2px; margin-left: 2px; }
.qz-play .fb .verse.is-off .v-txt { font-style: normal; }
.qz-gain { display: inline-block; margin-left: 6px; padding: 2px 9px; border-radius: 999px; background: linear-gradient(90deg, #E3C88E, #C9A45C); color: var(--blue-deep); font-size: .85rem; vertical-align: 3px; animation: trypop .4s cubic-bezier(.3,1.6,.5,1) .15s both; }
/* Stuck? Hint and Show reference (gold = helper waiting for you) */
.qz-help { display: flex; flex-wrap: wrap; gap: 8px; margin: -10px 0 18px; }
.qz-help-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 42px; padding: 0 16px; border: 2px solid var(--gold); border-bottom-width: 4px; border-radius: 14px; background: #fff; font-family: inherit; font-size: .98rem; font-weight: 700; color: var(--ink); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.qz-help-btn:active { transform: translateY(2px); border-bottom-width: 2px; margin-bottom: 2px; }
.qz-helped:empty { display: none; }
.qz-helped { display: grid; gap: 8px; margin: -6px 0 18px; }
.qz-hint, .qz-refbig { padding: 12px 16px; border-radius: 14px; background: #FFF8E6; border: 2px dashed var(--gold); font-weight: 600; color: var(--ink); animation: rise .25s ease; }
.qz-refbig { font-size: 1.15rem; font-weight: 700; }
/* Wrong guess: a nudge to try again */
.qz-nudge { min-height: 1.5em; margin-top: 12px; text-align: center; font-weight: 700; color: var(--red-deep); }
.qz-nudge.go { animation: shake .35s ease; }
.qz-tries { font-weight: 600; color: var(--muted); }
.qz-think { text-align: center; padding: 22px 16px; border: 2px dashed var(--line-dark); border-radius: 18px; }
.qz-think p { font-weight: 600; color: var(--muted); margin-bottom: 14px; }

/* ===== Results ===== */
.qz-end { text-align: center; }
.qz-score { position: relative; margin: 6px 0 16px; }
.qz-score b { display: block; font-size: clamp(3.4rem, 15vw, 4.6rem); font-weight: 700; letter-spacing: -0.04em; line-height: 1; color: var(--ink); animation: trypop .45s cubic-bezier(.3,1.6,.5,1) both; }
.qz-score span { display: inline-block; margin-top: 6px; font-size: 1.2rem; font-weight: 700; color: var(--green-deep); animation: trypop .45s cubic-bezier(.3,1.6,.5,1) .25s both; }
.qz-xpcard { position: relative; margin-bottom: 12px; padding: 16px; background: #fff; border: 2px solid var(--gold); border-bottom-width: 5px; border-radius: 20px; text-align: left; }
.qz-xpcard .qz-earned { font-size: 1rem; color: #8A6A12; }
.qz-xpcard.pop { animation: qz-card-pop .5s cubic-bezier(.3,1.6,.5,1); }
@keyframes qz-card-pop { 40% { transform: scale(1.04); } }
.qz-uptxt { margin-top: 8px; font-weight: 600; color: var(--ink); }
.qz-uptxt:empty { display: none; }
.qz-uptxt strong { color: #8A6A12; }
.qz-endstats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; background: #fff; border: 2px solid var(--line); border-radius: 20px; padding: 16px 8px; }
.qz-endstats b { display: block; font-size: 1.5rem; color: var(--ink); }
.qz-endstats span { font-size: .76rem; font-weight: 600; color: var(--muted); }
.qz-break { margin-top: 12px; background: #fff; border: 2px solid var(--line); border-radius: 20px; padding: 16px; text-align: left; }
.qz-break h3 { font-size: 1rem; margin-bottom: 10px; }
.qz-drow { display: grid; grid-template-columns: 78px 44px 1fr; align-items: center; gap: 10px; margin: 6px 0; }
.qz-drow b { font-variant-numeric: tabular-nums; }
.qz-drow i { display: block; width: var(--w); min-width: 6px; height: 12px; border-radius: 6px; background: var(--green); transform-origin: left; animation: qz-grow .6s cubic-bezier(.2,.9,.3,1) .3s both; }
@keyframes qz-grow { from { transform: scaleX(0); } }
.qz-gospel { margin-top: 18px; background: var(--blue); color: var(--paper); border-radius: 20px; padding: 22px 20px; }
.qz-gospel p { font-size: 1.05rem; line-height: 1.5; margin-bottom: 16px; }
.qz-gospel .btn { background: var(--gold); color: var(--blue-deep); box-shadow: 0 4px 0 #A8853F; }
.qz-gospel .btn:hover { background: var(--gold-light); }
.qz-endbtns { display: flex; flex-direction: column; gap: 10px; }
.qz-again { min-height: 48px; border: 2px solid var(--line); border-bottom-width: 4px; border-radius: 16px; background: #fff; font-family: inherit; font-size: 1rem; font-weight: 700; color: var(--ink); cursor: pointer; }
.qz-again:active { transform: translateY(2px); border-bottom-width: 2px; margin-bottom: 2px; }
/* In-quiz settings: gear in the top bar opens a small panel under it */
.qz-play .q-top { position: relative; }
.qz-cog svg { fill: none; }
.qz-cog[aria-expanded="true"] { color: var(--blue); background: var(--mist); }
.qz-pop { position: absolute; right: var(--gutter); top: calc(100% + 6px); z-index: 5; width: min(340px, calc(100vw - 32px)); padding: 6px 16px 10px; background: #fff; border: 2px solid var(--line); border-bottom-width: 5px; border-radius: 18px; box-shadow: 0 14px 30px rgba(20,42,70,.12); animation: rise .2s ease; }
.qz-pop-note { min-height: 1.2em; font-size: .82rem; font-weight: 700; color: var(--green-deep); }

@media (prefers-reduced-motion: reduce) {
  .qz-play, .qz-play *, .qz-view, .qz-tile, .qz-book-tile, .qz-sheet, .qz-sheet-wrap, .qz-sw i::after, .qz-xpbar i, .qz-cell i, .qz-ch, .qz-bigring circle, .qz-arow, .qz-arow .qz-bic, .qz-unlock, .qz-daily, .qz-vs-in, .qz-nm { animation: none !important; transition: none !important; }
}

/* ===== Question types (blueprint 2026-11-03) ===== */
.qz-type { display: inline-flex; align-items: center; height: 28px; padding: 0 12px; margin: 0 0 10px; border-radius: 999px; background: var(--mist); color: var(--blue); font-size: .85rem; font-weight: 700; letter-spacing: .02em; }
.qz-play .q.q-emoji { font-size: clamp(2.2rem, 11vw, 3rem); letter-spacing: .08em; line-height: 1.25; text-align: center; }
/* True or false: two big tiles side by side */
.qz-opts.tf { grid-template-columns: 1fr 1fr; }
.qz-opts.tf .opt { text-align: center; padding: 18px 12px; font-weight: 700; font-size: 1.15rem; }
/* Who am I? clues stack up as they are revealed */
.qz-clues { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; counter-reset: clue; }
.qz-clues li { counter-increment: clue; position: relative; padding: 12px 14px 12px 46px; background: #fff; border: 2px solid var(--line); border-radius: 14px; font-size: 1.05rem; line-height: 1.4; }
.qz-clues li::before { content: counter(clue); position: absolute; left: 12px; top: 11px; width: 24px; height: 24px; border-radius: 50%; background: var(--gold-soft); color: #8A6A12; font-size: .8rem; font-weight: 700; display: grid; place-items: center; }
.qz-clues li.new { animation: trypop .35s cubic-bezier(.3,1.6,.5,1) both; }
.qz-moreclue { margin: 0 0 18px; }
.qz-help .qz-moreclue { margin: 0; }
.qz-moreclue small { font-weight: 600; opacity: .7; margin-left: 4px; }
/* Put it in order: numbered slots on top, chips to tap below */
.qz-order { display: grid; gap: 14px; }
.qz-slots { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.qz-slots .slot { display: flex; align-items: center; gap: 10px; min-height: 58px; padding: 6px; border: 2px dashed var(--line-dark); border-radius: 16px; }
.qz-slots .slot .n { flex: none; width: 30px; height: 30px; margin-left: 4px; border-radius: 50%; background: var(--mist); color: var(--blue); font-weight: 700; display: grid; place-items: center; }
.qz-slots .slot .qz-chip { flex: 1; }
.qz-chips { display: grid; gap: 8px; }
.qz-chips:empty { display: none; }
.qz-chip { width: 100%; text-align: left; cursor: pointer; font: inherit; font-size: 1.02rem; font-weight: 500; line-height: 1.35; color: var(--ink); background: #fff; border: 2px solid var(--line); border-bottom-width: 4px; border-radius: 14px; padding: 12px 14px; -webkit-tap-highlight-color: transparent; }
.qz-chip:hover { border-color: var(--line-dark); }
.qz-chip:active { transform: translateY(2px); border-bottom-width: 2px; margin-bottom: 2px; }
.qz-chip[hidden] { display: none; }
.qz-chip.in.ok { border-color: var(--green); background: var(--green-bg); color: var(--green-deep); font-weight: 700; cursor: default; }
.qz-chip.in.ok:active { transform: none; border-bottom-width: 4px; margin-bottom: 0; }
.qz-check { width: 100%; }
.qz-check:disabled { opacity: .45; cursor: default; }

/* ===== Speed round + Survival ===== */
.qz-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.qz-mode { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; cursor: pointer; font: inherit; color: var(--ink); background: #fff; border: 2px solid var(--line); border-bottom-width: 5px; border-radius: 20px; padding: 14px; -webkit-tap-highlight-color: transparent; animation: rise .35s ease; }
.qz-mode:hover { border-color: var(--line-dark); }
.qz-mode:active { transform: translateY(2px); border-bottom-width: 3px; margin-bottom: 2px; }
.qz-mode-ic { font-size: 1.6rem; line-height: 1; margin-bottom: 4px; }
.qz-mode strong { font-size: 1.05rem; }
.qz-mode small { font-size: .85rem; line-height: 1.35; color: var(--muted); }
.qz-mode-best { margin-top: 6px; padding: 2px 9px; border-radius: 999px; background: var(--green-bg); color: var(--green-deep); font-size: .8rem; font-weight: 700; }
.qz-mode.m-speed { border-color: rgba(201,164,92,.55); }
.qz-mode.m-survival { border-color: rgba(194,65,45,.35); }
.qz-play.hurry .bar i { background: var(--red); }
.qz-play.hurry .qz-count { color: var(--red); }
.qz-best { margin: -6px 0 14px; font-weight: 600; color: var(--muted); }
.qz-best.new { color: var(--green-deep); }
.qz-mrow { text-align: left; padding: 12px 0; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.qz-mrow:first-of-type { border-top: 0; }
.qz-mrow > span { color: var(--green-deep); font-weight: 700; }
.qz-mrow .verse { margin: 4px 0 0; font-style: italic; color: var(--muted); }
.qz-mrow .verse strong { font-style: normal; }
.qz-mrow .verse .v-esv { font-style: normal; font-size: .8em; font-weight: 700; color: inherit; margin-left: 2px; }
.qz-runct { font-size: .85rem; margin-left: 4px; }

/* Survival hearts: big, under the options, beating harder as you lose them */
.qz-life { display: flex; justify-content: center; gap: 14px; margin: 22px 0 4px; font-size: 2.4rem; line-height: 1; user-select: none; }
.qz-life .h { display: inline-block; transform-origin: 50% 60%; }
.qz-life .h.off { opacity: .45; filter: grayscale(1); }
.qz-life.l0 .h.on { animation: beat 1.5s ease-in-out infinite; }
.qz-life.l1 .h.on { animation: beat-hard .95s ease-in-out infinite; }
.qz-life.l2 { font-size: 2.8rem; }
.qz-life.l2 .h.on { animation: beat-hard .55s ease-in-out infinite; filter: drop-shadow(0 0 10px rgba(194,65,45,.75)); }
.qz-life .h.break { opacity: 1; filter: none; animation: heart-break .7s ease both; }
@keyframes beat { 0%, 60%, 100% { transform: scale(1); } 15% { transform: scale(1.12); } 30% { transform: scale(1); } 45% { transform: scale(1.07); } }
@keyframes beat-hard { 0%, 60%, 100% { transform: scale(1); } 15% { transform: scale(1.25); } 30% { transform: scale(.96); } 45% { transform: scale(1.15); } }
@keyframes heart-break { 0% { transform: scale(1.3); } 15% { transform: translateX(-6px) rotate(-12deg); } 30% { transform: translateX(6px) rotate(10deg); } 45% { transform: translateX(-4px) rotate(-6deg); } 60% { transform: scale(1.1); } 100% { transform: scale(.9); opacity: .55; filter: grayscale(1); } }
/* One or two hearts gone: the screen edges pulse red, harder with one heart left */
.qz-play.danger1::after, .qz-play.danger2::after { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 5; }
.qz-play.danger1::after { box-shadow: inset 0 0 50px rgba(194,65,45,.18); animation: edge 1.9s ease-in-out infinite; }
.qz-play.danger2::after { box-shadow: inset 0 0 80px rgba(194,65,45,.38); animation: edge 1.1s ease-in-out infinite; }
@keyframes edge { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .qz-life .h.on, .qz-life .h.break, .qz-play.danger1::after, .qz-play.danger2::after { animation: none; }
}

/* Reference eye: hidden book by default, tap to see the book only */
.qz-eye { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 10px 0 12px; border: 2px solid var(--line); border-radius: 11px; background: #fff; font: inherit; font-size: .85rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--blue); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.qz-eye:hover { border-color: var(--line-dark); }
.qz-eye .pin { font-size: .9rem; letter-spacing: 0; }
.qz-eye svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: .75; }
.qz-eye.on { background: var(--mist); border-color: transparent; }
.qz-eye:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ===== After an answer: Summary + Read the context (like NeedGod) ===== */
.qz-more { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.qz-more-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border: 2px solid var(--line-dark); border-bottom-width: 3px; border-radius: 12px; background: #fff; font: inherit; font-size: .9rem; font-weight: 700; color: var(--ink); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.qz-more-btn:hover { border-color: var(--blue); }
.qz-more-btn:active { transform: translateY(2px); border-bottom-width: 1px; margin-bottom: 2px; }
.qz-rd { position: fixed; inset: 0; z-index: 300; display: flex; align-items: flex-end; justify-content: center; }
.qz-rd-bg { position: absolute; inset: 0; background: rgba(20,42,70,.45); animation: fade .18s ease both; }
.qz-rd-in { position: relative; width: 100%; max-width: 680px; max-height: 86vh; display: flex; flex-direction: column; background: var(--paper, #FFFDF8); border-radius: 22px 22px 0 0; box-shadow: 0 -10px 40px rgba(20,42,70,.25); animation: sheetup .22s cubic-bezier(.2,.9,.3,1) both; }
.qz-rd.out .qz-rd-in { animation: sheetdown .18s ease both; }
.qz-rd.out .qz-rd-bg { animation: fade .18s ease reverse both; }
@keyframes sheetup { from { transform: translateY(100%); } }
@keyframes sheetdown { to { transform: translateY(100%); } }
@keyframes fade { from { opacity: 0; } }
.qz-rd-top { display: flex; align-items: center; gap: 10px; padding: 14px 14px 10px 18px; border-bottom: 1px solid var(--line); }
.qz-rd-top strong { font-size: 1.1rem; margin-right: auto; }
.qz-rd-tabs { display: inline-flex; background: var(--mist); border-radius: 12px; padding: 3px; }
.qz-rd-tabs button { border: 0; background: none; font: inherit; font-size: .85rem; font-weight: 700; color: var(--muted); padding: 6px 10px; border-radius: 9px; cursor: pointer; }
.qz-rd-tabs button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(20,42,70,.12); }
.qz-rd-tabs button[hidden] { display: none; }
.qz-rd-x { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border: 2px solid var(--line); border-radius: 12px; background: #fff; cursor: pointer; }
.qz-rd-x svg { width: 18px; height: 18px; stroke: var(--ink); stroke-width: 2.5; stroke-linecap: round; fill: none; }
.qz-rd-body { overflow-y: auto; padding: 14px 18px 22px; -webkit-overflow-scrolling: touch; }
.qz-sum { list-style: none; margin: 0; padding: 0; counter-reset: sum; }
.qz-sum li { counter-increment: sum; position: relative; margin: 0 0 12px; padding-left: 36px; font-size: 1.05rem; line-height: 1.55; }
.qz-sum li::before { content: counter(sum); position: absolute; left: 0; top: 1px; width: 26px; height: 26px; border-radius: 50%; background: var(--mist); color: var(--blue); font-size: .85rem; font-weight: 700; display: grid; place-items: center; }
.qz-ctx h4 { margin: 14px 0 6px; font-size: .95rem; color: var(--blue); }
.qz-ctx .v { margin: 0 0 8px; font-size: 1.02rem; line-height: 1.6; padding: 4px 8px; border-radius: 10px; }
.qz-ctx .v sup { font-size: .7rem; font-weight: 700; color: var(--muted); margin-right: 2px; }
.qz-ctx .v.hit { background: var(--gold-soft); box-shadow: inset 3px 0 0 var(--gold); }
.qz-ctx-wait { color: var(--muted); }
.qz-ctx-more { display: block; width: 100%; margin: 4px 0 10px; padding: 10px; border: 0; border-top: 1px dashed var(--line-dark); background: none; font: inherit; font-weight: 700; color: var(--blue); cursor: pointer; }
.qz-ctx-more[hidden] { display: none; }
.qz-credit { margin: 14px 0 0; font-size: .82rem; color: var(--muted); }
.qz-credit a { color: inherit; font-weight: 700; }
@media (prefers-reduced-motion: reduce) { .qz-rd-in, .qz-rd-bg, .qz-rd.out .qz-rd-in { animation: none; } }

/* ===== Leaderboard (opt-in, questions right, This week + All time) ===== */
.qz-nav { grid-template-columns: repeat(4, 1fr); }
@media (min-width: 760px) { .qz-nav { width: 540px; } }
.qz-lbjoin { margin-bottom: 16px; padding: 16px; background: #fff; border: 2px solid var(--gold); border-bottom-width: 5px; border-radius: 22px; animation: rise .35s ease; }
.qz-lbjoin-top { display: flex; align-items: flex-start; gap: 12px; }
.qz-lbjoin-top > div { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.qz-lbjoin strong { font-size: 1.15rem; color: var(--ink); line-height: 1.3; }
.qz-lbjoin-top span:not(.qz-vs-ic) { font-size: .9rem; font-weight: 600; color: var(--muted); }
.qz-lbjoin .qz-play-btn { margin-top: 12px; min-height: 52px; font-size: 1rem; }
.qz-lbform { display: flex; flex-direction: column; gap: 4px; }
.qz-lbform small { font-size: .85rem; font-weight: 600; color: var(--muted); line-height: 1.4; }
.qz-lbin { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 0 14px; background: #FBF8F1; border: 2px solid var(--line); border-radius: 14px; }
.qz-lbin:focus-within { border-color: var(--blue); }
.qz-lbin input { flex: 1; min-width: 0; padding: 13px 0; border: 0; background: none; font-family: inherit; font-size: 16px; font-weight: 700; color: var(--ink); outline: none; }
.qz-lbin em { font-style: normal; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.qz-lberr { margin: 8px 0 0; font-size: .88rem; font-weight: 700; color: #B3261E; }
.qz-lbjoin .qz-erase-btns { margin-top: 14px; }
.qz-lbseg { margin-bottom: 8px; }
.qz-lbnote { margin: 0 0 16px; text-align: center; font-size: .88rem; font-weight: 600; color: var(--muted); }
.qz-lbnote b { color: var(--ink); }
.qz-lbdemo { margin: 0 0 12px; padding: 8px 12px; text-align: center; font-size: .8rem; font-weight: 700; color: #8A6A12; background: #FFF8E6; border: 2px dashed var(--gold); border-radius: 12px; }
.qz-lblist { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.qz-lbrow { display: flex; align-items: center; gap: 12px; padding: 11px 14px; background: #fff; border: 2px solid var(--line); border-radius: 14px; animation: rise .3s ease both; }
.qz-lbn { flex: none; min-width: 26px; font-weight: 800; color: var(--muted); font-variant-numeric: tabular-nums; }
.qz-lbname { flex: 1; min-width: 0; font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qz-lbrow > b { font-size: 1.05rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.qz-lbrow.you { border-color: var(--blue); background: var(--mist); }
.qz-youtag { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 999px; background: var(--blue); color: var(--paper); font-style: normal; font-size: .65rem; font-weight: 800; letter-spacing: .06em; vertical-align: 2px; }
.qz-lbgap { padding: 4px 0; text-align: center; color: var(--muted); font-weight: 800; letter-spacing: .2em; }
.qz-lbleave { display: block; margin: 22px auto 0; padding: 8px 12px; border: 0; background: none; font-family: inherit; font-size: .85rem; font-weight: 700; color: var(--muted); text-decoration: underline; cursor: pointer; }
.qz-lbleave.sure { color: #B3261E; }

/* Questions-right mark: a glossy green check coin. Used on the level card and the leaderboard. */
.qz-chk { display: inline-grid; place-items: center; flex: none; width: 1.25em; height: 1.25em; margin-right: .3em; vertical-align: -.22em; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #6FD08E, #2F8F4E 70%); box-shadow: 0 2px 0 #1F6A38, inset 0 1px 0 rgba(255,255,255,.45); }
.qz-chk svg { width: 72%; height: 72%; fill: none; stroke: #fff; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; }
.qz-rc { display: inline-flex; align-items: center; }
.qz-rc b { font-size: 1.05rem; color: var(--green-deep); }
.qz-sc { display: inline-flex; align-items: center; }
.qz-lbrow .qz-sc { min-width: 4.4em; }

/* Keep It Lit card on the Play hub (links to keep-it-lit.html) */
.qz-litcard { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding: 14px 16px; text-decoration: none; color: var(--ink); background: linear-gradient(120deg, #FFF6DD, #fff 60%); border: 2px solid rgba(201,164,92,.55); border-bottom-width: 5px; border-radius: 20px; animation: rise .35s ease; }
.qz-litcard > span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.qz-litcard strong { font-size: 1.05rem; }
.qz-litcard small { font-size: .85rem; line-height: 1.35; color: var(--muted); }
.qz-litgo { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--blue); color: var(--paper); font-size: .9rem; box-shadow: 0 3px 0 var(--blue-lip); }
.qz-litcard:active { transform: translateY(2px); border-bottom-width: 3px; margin-bottom: 2px; }

/* No text highlighting on the quiz screens you tap (the play screen already had this). Inputs still take typing. */
.qz-nav, .qz-level, .qz-daily, .qz-modes, .qz-mode, .qz-litcard, .qz-tiles, .qz-books, .qz-seg, .qz-asum, .qz-alist, .qz-champ, .qz-lbtiles, .qz-duo, .qz-lbyou, .qz-lblist, .qz-lbme, .qz-resume, .qz-chs, .qz-cells { -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent; }
.qz-lbjoin input, .qz-nm input { -webkit-user-select: text; user-select: text; }

/* Phones use the same pill tabs as desktop, at the top under the title (Ethan 2026-11-03: the bottom bar was easy to miss). */
.qz-nav { position: static; width: 100%; max-width: 540px; margin: 0 auto 18px; padding: 4px; background: #fff; border: 2px solid var(--line); border-radius: 999px; -webkit-backdrop-filter: none; backdrop-filter: none; }
.qz-nav button { position: relative; flex-direction: row; justify-content: center; gap: 5px; padding: 9px 0; border-radius: 999px; font-size: .8rem; }
.qz-nav svg { width: 16px; height: 16px; }
.qz-nav button[aria-current] { background: var(--blue); color: var(--paper); box-shadow: 0 3px 0 var(--blue-lip); }
.qz-nav button[aria-current] svg { transform: none; }
.qz-nav button:not([aria-current]) { color: var(--muted); }
body.has-qz-nav { padding-bottom: 0; }
.qz-nav .qz-newdot { top: 4px; right: 6px; }
@media (min-width: 760px) { .qz-nav button { gap: 8px; padding: 10px 0; font-size: .95rem; } .qz-nav svg { width: 20px; height: 20px; } }
@media (max-width: 420px) { .qz-nav svg { display: none; } .qz-nav button { font-size: .85rem; } }
/* Leaderboard, redesigned 2026-11-04: champion card for #1, silver + bronze pair, avatar rows, your place card */
.qz-lbseg button { display: inline-flex; align-items: center; justify-content: center; gap: 2px; }
.qz-lbseg button .qz-chk { font-size: .95em; }
.qz-flame { background: radial-gradient(circle at 35% 30%, #FFC36B, #E8731F 70%); box-shadow: 0 2px 0 #A84A10, inset 0 1px 0 rgba(255,255,255,.5); }
.qz-flame svg { fill: #fff; stroke: none; width: 66%; height: 66%; }
.qz-av { display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; background: var(--av, var(--blue)); color: #fff; font-weight: 800; font-size: .95rem; box-shadow: inset 0 -3px 0 rgba(0,0,0,.18); }

.qz-lbyou { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; padding: 12px 16px; background: var(--mist); border: 2px solid var(--blue); border-bottom-width: 4px; border-radius: 18px; animation: rise .3s ease both; }
.qz-lbyou-n { flex: none; display: flex; flex-direction: column; align-items: center; min-width: 64px; font-size: 1.9rem; font-weight: 800; line-height: 1; color: var(--blue); font-variant-numeric: tabular-nums; }
.qz-lbyou-n small { margin-bottom: 4px; font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.qz-lbyou-t { display: flex; flex-direction: column; min-width: 0; }
.qz-lbyou-t strong { font-size: 1rem; color: var(--ink); line-height: 1.3; }
.qz-lbyou-t span { font-size: .85rem; font-weight: 600; color: var(--muted); }

.qz-champ { position: relative; display: flex; flex-direction: column; align-items: center; margin-bottom: 10px; padding: 18px 16px 20px; overflow: hidden; text-align: center;
  background: radial-gradient(120% 90% at 50% 0%, #2B5287, var(--blue) 55%, var(--blue-deep)); border: 2px solid var(--gold); border-bottom: 5px solid #A8853F; border-radius: 24px;
  box-shadow: 0 10px 28px rgba(20,42,70,.22); animation: qz-pop-in .45s cubic-bezier(.3,1.4,.5,1) both; }
.qz-champ > * { position: relative; }
.qz-champ-rays { position: absolute !important; left: 50%; top: 92px; width: 460px; height: 460px; margin: -230px 0 0 -230px; border-radius: 50%; pointer-events: none;
  background: repeating-conic-gradient(rgba(227,200,142,.16) 0 10deg, transparent 10deg 24deg); -webkit-mask: radial-gradient(circle, #000 18%, transparent 62%); mask: radial-gradient(circle, #000 18%, transparent 62%); animation: qz-spin 30s linear infinite; }
@keyframes qz-spin { to { transform: rotate(360deg); } }
.qz-champ-lbl { font-size: .7rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-light); }
.qz-champ-av { margin: 34px 0 10px; }
.qz-champ-av .qz-av { width: 76px; height: 76px; font-size: 2rem; box-shadow: 0 0 0 4px var(--gold), 0 0 0 9px rgba(227,200,142,.25), 0 0 30px rgba(227,200,142,.55), inset 0 -5px 0 rgba(0,0,0,.2); }
.qz-crown { position: absolute; left: 50%; top: -27px; font-size: 1.9rem; line-height: 1; transform: translateX(-50%) rotate(-8deg); animation: qz-crown 2.6s ease-in-out infinite; filter: drop-shadow(0 2px 2px rgba(0,0,0,.3)); }
@keyframes qz-crown { 50% { transform: translateX(-50%) translateY(-3px) rotate(6deg); } }
.qz-champ strong { font-size: 1.3rem; color: var(--paper); line-height: 1.2; overflow-wrap: anywhere; }
.qz-champ strong small { color: var(--gold-light); font-weight: 700; font-size: .7em; }
.qz-champ .qz-sc { margin-top: 8px; padding: 6px 16px; font-size: 1.55rem; color: var(--blue-deep); background: linear-gradient(180deg, #F4DFA8, var(--gold)); border-radius: 999px; box-shadow: 0 3px 0 #8E6E2E; font-variant-numeric: tabular-nums; }
.qz-champ.you { border-color: var(--gold-light); }
.qz-champ .qz-youtag { background: var(--gold); color: var(--blue-deep); }

.qz-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.qz-duoc { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; padding: 16px 8px 14px; text-align: center; background: #fff; border: 2px solid var(--line); border-top: 5px solid #AEB6C1; border-radius: 20px; animation: rise .4s ease both; }
.qz-duoc.p2 { background: linear-gradient(180deg, #F2F4F7, #fff 60%); }
.qz-duoc.p3 { border-top-color: #C38B5C; background: linear-gradient(180deg, #F9EADB, #fff 60%); }
.qz-duo-m { position: absolute; top: 6px; right: 8px; font-size: 1.5rem; line-height: 1; }
.qz-duoc .qz-av { width: 50px; height: 50px; font-size: 1.35rem; box-shadow: 0 0 0 3px #fff, 0 0 0 6px #AEB6C1, inset 0 -4px 0 rgba(0,0,0,.18); }
.qz-duoc.p3 .qz-av { box-shadow: 0 0 0 3px #fff, 0 0 0 6px #C38B5C, inset 0 -4px 0 rgba(0,0,0,.18); }
.qz-duoc strong { display: block; max-width: 100%; margin-top: 4px; font-size: .95rem; color: var(--ink); line-height: 1.2; overflow-wrap: anywhere; }
.qz-duoc .qz-sc { font-size: 1.2rem; color: var(--ink); font-variant-numeric: tabular-nums; }
.qz-duoc.you { border-color: var(--blue); background: var(--mist); }
.qz-duoc .qz-youtag { margin: 0; }

.qz-lbrow { gap: 10px; padding: 9px 14px 9px 10px; }
.qz-lbrow .qz-lbn { min-width: 24px; text-align: center; }
.qz-lbrow .qz-sc { justify-content: flex-end; }
@media (prefers-reduced-motion: reduce) { .qz-champ-rays, .qz-crown { animation: none; } }
.qz-mode.m-ark { text-decoration: none; border-color: rgba(154,95,46,.45); }
.qz-arkic { display: block; width: 2.5rem; height: auto; }
.qz-bolt { background: radial-gradient(circle at 35% 30%, #F6DE8E, #C9A45C 70%); box-shadow: 0 2px 0 #8E6E2E, inset 0 1px 0 rgba(255,255,255,.5); }
.qz-bolt svg { fill: #fff; stroke: none; width: 66%; height: 66%; }
/* Leaderboard board picker: tiles, not a second pill bar */
.qz-lbtiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 4px 0 14px; }
.qz-lbtile { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 4px 10px; font-family: inherit; color: var(--ink); cursor: pointer; background: #fff; border: 2px solid var(--line); border-bottom-width: 4px; border-radius: 16px; transition: transform .15s, border-color .15s; -webkit-tap-highlight-color: transparent; }
.qz-lbtile .qz-chk { width: 2rem; height: 2rem; margin: 0 0 4px; font-size: 1rem; }
.qz-lbtile strong { font-size: .9rem; line-height: 1.2; }
.qz-lbtile small { font-size: .7rem; font-weight: 700; color: var(--muted); line-height: 1.2; }
.qz-lbtile:hover { border-color: var(--line-dark); }
.qz-lbtile[aria-pressed="true"] { border-color: var(--gold); background: #FFF8E6; transform: translateY(-2px); box-shadow: 0 6px 14px rgba(201,164,92,.25); }
.qz-lbtile[aria-pressed="false"] .qz-chk { filter: saturate(.55); opacity: .8; }
.qz-lbnote { margin: -6px 0 14px; }
.qz-lbdemo { padding: 6px 10px; font-size: .75rem; }
.qz-lbyou { padding: 10px 14px; gap: 12px; }
.qz-lbyou-n { font-size: 1.6rem; min-width: 56px; }
.qz-lbsub { max-width: 240px; margin: -4px auto 16px; }
.qz-lbsub button { padding: 7px 0; font-size: .88rem; }
.snd-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 2px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.snd-btn svg { width: 18px; height: 18px; }
.snd-btn:hover { border-color: var(--line-dark); color: var(--ink); }
.snd-btn[aria-pressed="false"] { color: #B9AFA0; }
.snd-abs { position: absolute; right: 10px; top: 10px; z-index: 2; }
.lt-topr, .ak-topr { display: inline-flex; align-items: center; gap: 8px; }
.qz-vol { display: flex; align-items: center; gap: 10px; padding: 2px 0 12px; color: var(--muted); }
.qz-vol span { font-size: .85rem; font-weight: 700; color: var(--muted); margin-right: 2px; }
.qz-vol svg { flex: none; width: 18px; height: 18px; }
.qz-vol input { flex: 1; min-width: 0; height: 28px; margin: 0; background: none; -webkit-appearance: none; appearance: none; cursor: pointer; }
.qz-vol input::-webkit-slider-runnable-track { height: 8px; border-radius: 999px; background: linear-gradient(90deg, var(--green) var(--v, 80%), var(--line) var(--v, 80%)); }
.qz-vol input::-moz-range-track { height: 8px; border-radius: 999px; background: var(--line); }
.qz-vol input::-moz-range-progress { height: 8px; border-radius: 999px; background: var(--green); }
.qz-vol input::-webkit-slider-thumb { -webkit-appearance: none; width: 24px; height: 24px; margin-top: -8px; border-radius: 50%; background: #fff; border: 2px solid var(--green); box-shadow: 0 2px 4px rgba(0,0,0,.18); }
.qz-vol input::-moz-range-thumb { width: 22px; height: 22px; border-radius: 50%; background: #fff; border: 2px solid var(--green); box-shadow: 0 2px 4px rgba(0,0,0,.18); }
.qz-vol input:disabled { opacity: .45; cursor: default; }
/* The tab bar sits in the page now (not pinned to the bottom). As a flex item its old z-index 40 still counted and slid it over the sticky header (z 20) on scroll. Keep it under the header. */
.qz-nav { z-index: 1; }

/* Sound panel (sound.js, Ethan 2026-11-11): the speaker button opens one small card with Music and Sound effects,
   each with its own switch and volume. Fixed so it works on the full screen games too. */
.qz-sndbtn { width: 40px; height: 40px; border-radius: 12px; margin-left: auto; }
.qz-sndbtn svg { width: 22px; height: 22px; }
.qz-sndbtn + .qz-setbtn { margin-left: 0; }
.snd-btn[aria-expanded="true"] { color: var(--blue); border-color: var(--blue); }
.snd-panel { position: fixed; z-index: 200; width: min(320px, calc(100vw - 32px)); box-sizing: border-box; background: #fff; border: 2px solid var(--line); border-bottom-width: 5px; border-radius: 18px; padding: 8px 16px 4px; box-shadow: 0 14px 34px rgba(20, 42, 70, .18); animation: sndIn .18s ease-out; text-align: left; }
.snd-panel-h { display: flex; align-items: center; justify-content: space-between; padding: 2px 0 2px; }
.snd-panel-h strong { font-size: 1.05rem; color: var(--ink); }
.snd-panel-x { width: 36px; height: 36px; margin-right: -8px; border: 0; background: none; color: var(--muted); font-size: 1.6rem; line-height: 1; cursor: pointer; border-radius: 10px; }
.snd-panel-x:hover { color: var(--ink); }
.snd-panel .qz-sw + .qz-vol + .qz-sw { border-top: 2px solid var(--line); }
@keyframes sndIn { from { opacity: 0; transform: translateY(-6px) scale(.98); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .snd-panel { animation: none; } }
@media (max-width: 440px) {
  .qz-level { gap: 10px; }
  .qz-level .qz-sndbtn, .qz-level .qz-setbtn { width: 36px; height: 36px; }
  .qz-level .qz-sndbtn + .qz-setbtn { margin-left: -4px; }
}

/* Floating music notes around the speaker button while music plays (Ethan 2026-11-11). Subtle, gold, never in the way. */
.snd-btn { position: relative; overflow: visible; }
.snd-btn.mus-on::before, .snd-btn.mus-on::after { position: absolute; pointer-events: none; font-size: 12px; line-height: 1; color: var(--gold); opacity: 0; }
.snd-btn.mus-on::before { content: "\266A"; top: -4px; right: -5px; animation: musNoteR 3s ease-in-out infinite; }
.snd-btn.mus-on::after { content: "\266B"; top: -2px; left: -6px; animation: musNoteL 3s ease-in-out 1.5s infinite; }
@keyframes musNoteR { 0% { opacity: 0; transform: translate(0, 6px) scale(.7) rotate(0); } 25% { opacity: .8; } 100% { opacity: 0; transform: translate(6px, -14px) scale(1) rotate(14deg); } }
@keyframes musNoteL { 0% { opacity: 0; transform: translate(0, 6px) scale(.7) rotate(0); } 25% { opacity: .7; } 100% { opacity: 0; transform: translate(-6px, -14px) scale(1) rotate(-14deg); } }
@media (prefers-reduced-motion: reduce) { .snd-btn.mus-on::before, .snd-btn.mus-on::after { animation: none; opacity: .7; transform: none; } }
.snd-note { margin: 0 0 10px; padding: 8px 10px; border-radius: 10px; background: #FBF6EA; color: var(--muted); font-size: .8rem; line-height: 1.4; }
/* More obvious (Ethan 2026-11-11): same size, full color, a deeper gold, quicker and farther float, gold ring on the button */
.snd-btn.mus-on { border-color: var(--gold); color: #9C7424; }
.snd-btn.mus-on::before, .snd-btn.mus-on::after { color: #B8862E; text-shadow: 0 0 6px rgba(201, 164, 92, .55); }
.snd-btn.mus-on::before { animation-duration: 2.2s; }
.snd-btn.mus-on::after { animation-duration: 2.2s; animation-delay: 1.1s; }
@keyframes musNoteR { 0% { opacity: 0; transform: translate(0, 6px) scale(.7) rotate(0); } 15% { opacity: 1; } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(8px, -20px) scale(1) rotate(14deg); } }
@keyframes musNoteL { 0% { opacity: 0; transform: translate(0, 6px) scale(.7) rotate(0); } 15% { opacity: 1; } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(-8px, -20px) scale(1) rotate(-14deg); } }
@media (prefers-reduced-motion: reduce) { .snd-btn.mus-on::before, .snd-btn.mus-on::after { opacity: 1; } }
