/* Session, activities, rewards and end screen (spec §6): one task per screen, big targets, instant feedback. */
.session-top { display: flex; align-items: center; gap: 12px; }
.sbar { flex: 1; height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.sbar i { display: block; height: 100%; width: 0; background: var(--good); border-radius: inherit; transition: width .4s ease; }
.quit { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); box-shadow: var(--shadow); }
.quit .em { --em: 26px; }
.area { display: flex; flex-direction: column; gap: 14px; flex: 1; }
.prompt { display: flex; align-items: center; justify-content: center; gap: 12px; position: relative; min-height: 88px; }
.prompt-label { font-weight: 700; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.speaker { width: 88px; height: 88px; border-radius: 50%; background: var(--blue); box-shadow: 0 10px 28px rgb(47 128 237 / .35); display: grid; place-items: center; }
.speaker .em { --em: 46px; }
.speaker:active { transform: scale(.95); }
.flag { position: absolute; right: 0; top: 0; width: 48px; height: 48px; opacity: .45; border-radius: 50%; display: grid; place-items: center; }
.flag .em { --em: 22px; }
.flag.done { opacity: 1; background: var(--surface-2); }
.grid { display: grid; gap: 12px; }
.grid.cols-2 { grid-template-columns: 1fr 1fr; }
.grid.cols-1 { grid-template-columns: 1fr; }
.card {
  min-height: 120px; padding: 6px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow);
  display: grid; place-items: center; transition: transform .15s ease, box-shadow .2s ease, opacity .2s ease;
}
.card:active { transform: scale(.97); }
.card:disabled { cursor: default; }
.card-stage { width: 100%; }
.grid.cols-1 .card { min-height: 0; }
.grid.cols-1 .stage.small { aspect-ratio: 16 / 7; }
.card.good, .card.reveal { box-shadow: 0 0 0 5px var(--good), var(--shadow); }
.card.good { animation: pop-in .35s ease; }
.card.bad { box-shadow: 0 0 0 5px var(--bad), var(--shadow); animation: shake .45s; }
.card.dim { opacity: .45; }
.card.speaking { box-shadow: 0 0 0 5px var(--blue), var(--shadow); }
.tone-card { min-height: 96px; }
.tone-card svg { width: 100%; max-width: 160px; height: auto; }
@keyframes pop-in { 50% { transform: scale(1.05); } }

.meet { display: flex; flex-direction: column; gap: 12px; }
.voice-dots { display: flex; justify-content: center; gap: 8px; }
.voice-dots i { width: 12px; height: 12px; border-radius: 50%; background: var(--surface-2); transition: background .2s; }
.voice-dots i.on { background: var(--blue); }
.meet-row { display: flex; justify-content: center; align-items: center; gap: 24px; min-height: 72px; }
.say-it { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); box-shadow: var(--shadow); opacity: .5; }
.say-it .em { --em: 38px; }
.say-it.go { opacity: 1; animation: pulse .7s ease-in-out 2; box-shadow: 0 0 0 6px var(--accent); }
.gesture { display: flex; align-items: center; gap: 6px; }
.gesture > .em { --em: 30px; }
.gesture-pic { width: 72px; }
.anchor, .fact { margin: 0; padding: 12px 16px; border-radius: 16px; background: var(--surface-2); font-size: 18px; line-height: 1.6; }
.fact { font-size: 16px; color: var(--muted); }
.buddies { display: flex; align-items: center; justify-content: center; gap: 8px; color: var(--muted); font-weight: 700; }
.buddy { width: 64px; }
.extras { display: flex; justify-content: center; gap: 12px; align-items: baseline; }
.hanzi { font-size: 34px; font-weight: 700; }
.pinyin { font-size: 22px; color: var(--muted); }
.teach { display: flex; flex-direction: column; gap: 12px; padding: 12px; border-radius: var(--radius); background: var(--surface-2); }

.choice { display: flex; flex-direction: column; align-items: center; gap: 14px; margin: auto 0; text-align: center; width: 100%; }
.choice h2 { margin: 0; font-size: 26px; }
.choice-btn { width: 100%; min-height: 72px; font-size: 20px; justify-content: flex-start; padding: 0 24px; }

.tf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tf { min-height: 84px; border-radius: var(--radius); }
.tf.good { box-shadow: 0 0 0 5px var(--good), var(--shadow); }
.tf.bad { box-shadow: 0 0 0 5px var(--bad), var(--shadow); animation: shake .45s; }

.story { display: flex; flex-direction: column; gap: 12px; }
.story-title { text-align: center; }
.story-dots { display: flex; justify-content: center; gap: 8px; }
.story-dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--surface-2); }
.story-dots i.on { background: var(--accent); }
.row { display: flex; gap: 12px; justify-content: center; }

.speed { display: flex; flex-direction: column; gap: 12px; }
.timer { height: 10px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.timer i { display: block; height: 100%; background: var(--accent); animation: drain linear forwards; }
.combo { align-self: center; display: flex; align-items: center; gap: 6px; font-size: 28px; font-weight: 900; }
@keyframes drain { from { width: 100%; } to { width: 0; } }

.end { display: flex; flex-direction: column; align-items: center; gap: 16px; margin: auto 0; width: 100%; }
.end-xp { font-size: 56px; font-weight: 900; display: flex; align-items: center; gap: 8px; color: var(--accent); }
.level-up { font-size: 24px; font-weight: 800; margin: 0; }
.end-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: 100%; }
.tile { border-radius: 16px; background: var(--surface); box-shadow: var(--shadow); padding: 4px; }
.tile.lit { animation: light-up .6s ease both; }
.end-actions { display: flex; flex-direction: column; gap: 10px; width: 100%; }
@keyframes light-up { from { opacity: 0; transform: scale(.6); filter: grayscale(1); } }

.xp-float {
  position: fixed; transform: translate(-50%, 0); z-index: 50; pointer-events: none; font-weight: 900;
  color: var(--accent); display: flex; align-items: center; gap: 4px; animation: float-up .9s ease-out forwards;
}
@keyframes float-up { to { transform: translate(-50%, -60px); opacity: 0; } }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 10px; height: 14px; border-radius: 3px; animation: fall var(--d) ease-in forwards; }
@keyframes fall { to { transform: translate(var(--x), 105vh) rotate(540deg); } }
