/* MicroPod Studio — custom styles on top of Tailwind CDN */

.btn-primary {
  background: linear-gradient(135deg, #10b981, #047857);
  color: white;
  font-weight: 700;
  padding: 0.65rem 1.4rem;
  border-radius: 0.9rem;
  transition: transform .12s ease, filter .12s ease, opacity .12s ease;
  box-shadow: 0 6px 20px -6px rgba(16, 185, 129, .6);
}
.btn-primary:not(:disabled):hover { transform: translateY(-1px); filter: brightness(1.07); }
.btn-primary:disabled { box-shadow: none; }

.btn-secondary {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  color: #e2e8f0;
  font-weight: 700;
  padding: 0.65rem 1.4rem;
  border-radius: 0.9rem;
  transition: background .12s ease;
}
.btn-secondary:hover { background: rgba(255,255,255,.14); }

.btn-ghost {
  color: #94a3b8;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 0.75rem;
}
.btn-ghost:hover { color: #e2e8f0; background: rgba(255,255,255,.06); }

/* Stepper states (set via JS by adding .step-active / .step-done) */
.step { color: #64748b; line-height: 1.1; }
.step.step-active { background: #10b981; color: #04231a; box-shadow: 0 4px 14px -4px rgba(16,185,129,.6); }
.step.step-done { color: #6ee7b7; }

/* Admin-only: steps become clickable jump targets (toggled via .stepper-admin on #stepper). */
.stepper-admin .step { cursor: pointer; transition: background .15s ease, color .15s ease, transform .1s ease; }
.stepper-admin .step:not(.step-active):hover { background: rgba(16,185,129,.18); color: #a7f3d0; }
.stepper-admin .step:active { transform: translateY(1px); }

/* Member inputs / question cards */
.member-input {
  width: 100%;
  border-radius: 0.75rem;
  background: rgba(11,16,32,.6);
  border: 1px solid rgba(255,255,255,.1);
  padding: 0.55rem 0.8rem;
  font-size: 0.9rem;
}
.member-input:focus { outline: none; box-shadow: 0 0 0 2px #10b981; }

.age-btn {
  padding: 0.4rem 1rem;
  border-radius: 0.6rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #94a3b8;
}
.age-btn.active { background: #10b981; color: #04231a; }

.question-card {
  text-align: right;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  border-radius: 1rem;
  padding: 1rem 1.1rem;
  cursor: pointer;
  transition: border-color .12s ease, background .12s ease;
}
.question-card:hover { border-color: #6ee7b7; }
.question-card.selected { border-color: #10b981; background: rgba(16,185,129,.12); }
.question-card .concepts { color: #94a3b8; font-size: .78rem; margin-top: .4rem; }

/* Free-writing custom question editor (revealed under the "✏️ שאלה משלכם" card) */
.custom-q-editor { margin-top: -.25rem; }
.custom-q-input {
  width: 100%; resize: vertical; text-align: right;
  background: rgba(16,185,129,.06); border: 1px solid rgba(16,185,129,.35);
  border-radius: .9rem; padding: .7rem .9rem; color: #e2e8f0; font-size: .95rem; line-height: 1.6;
}
.custom-q-input:focus { outline: none; border-color: #10b981; box-shadow: 0 0 0 3px rgba(16,185,129,.18); }
.custom-q-input::placeholder { color: #64748b; }

/* Chat bubbles */
.bubble { max-width: 85%; padding: .6rem .85rem; border-radius: 1rem; font-size: .9rem; line-height: 1.6; white-space: pre-wrap; }
.bubble-bot  { background: rgba(16,185,129,.14); border: 1px solid rgba(16,185,129,.3); align-self: flex-start; border-bottom-right-radius: .25rem; }
.bubble-user { background: rgba(255,255,255,.1); align-self: flex-end; border-bottom-left-radius: .25rem; }
/* Markdown emphasis in bubbles — Hebrew italics read poorly, so show emphasis as weight/colour, not slant. */
.bubble strong { font-weight: 800; color: #d1fae5; }
.bubble em { font-style: normal; font-weight: 700; color: #a7f3d0; }
.bubble-row { display: flex; }
.bubble-row.user { justify-content: flex-end; }

/* Record button */
.record-btn {
  display: inline-flex; align-items: center; gap: .6rem;
  padding: 1rem 2rem; border-radius: 999px; font-size: 1.1rem;
  background: rgba(244,63,94,.15); border: 2px solid rgba(244,63,94,.5);
  color: #fecdd3; transition: transform .12s ease;
}
.record-btn:hover { transform: scale(1.03); }
.record-btn.recording { background: rgba(244,63,94,.3); border-color: #f43f5e; color: #fff; animation: pulse 1.2s infinite; }
@keyframes pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(244,63,94,.5); } 50% { box-shadow: 0 0 0 14px rgba(244,63,94,0); } }

#timer.warning { color: #fbbf24; }
#timer.danger  { color: #f43f5e; }

/* Soundboard pads */
.pad {
  padding: 1rem .5rem; border-radius: 1rem; font-weight: 700; font-size: .9rem;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12);
  transition: transform .08s ease, background .12s ease; display: flex; flex-direction: column; align-items: center; gap: .35rem;
}
.pad:hover { background: rgba(255,255,255,.12); }
.pad:active, .pad.playing { transform: scale(.95); background: rgba(16,185,129,.25); border-color: #10b981; }
.pad .emoji { font-size: 1.6rem; }

.screen { animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---- Script builder (research screen) ---- */
.speaker-add {
  --sp: #10b981;
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .82rem; font-weight: 700; color: var(--sp);
  border: 1px solid color-mix(in srgb, var(--sp) 45%, transparent);
  background: color-mix(in srgb, var(--sp) 12%, transparent);
  padding: .35rem .7rem; border-radius: 999px; transition: background .12s ease;
}
.speaker-add:hover { background: color-mix(in srgb, var(--sp) 22%, transparent); }

.script-block {
  --sp: #10b981;
  border: 1px solid rgba(255,255,255,.1);
  border-right: 3px solid var(--sp);
  background: rgba(11,16,32,.45);
  border-radius: .75rem; padding: .55rem .7rem;
}
.script-block-head { display: flex; align-items: center; gap: .4rem; margin-bottom: .35rem; }
.sp-dot { width: .6rem; height: .6rem; border-radius: 999px; background: var(--sp); }
.sp-name { font-size: .82rem; font-weight: 700; color: var(--sp); }
.sp-section { font-size: .68rem; font-weight: 700; color: #94a3b8; background: rgba(148,163,184,.14); padding: .08rem .45rem; border-radius: 999px; }
.sp-actions { margin-inline-start: auto; display: flex; align-items: center; gap: .12rem; }
.sp-move { color: #64748b; font-size: .72rem; line-height: 1; padding: .12rem .3rem; border-radius: .4rem; }
.sp-move:hover:not(:disabled) { color: #818cf8; background: rgba(99,102,241,.12); }
.sp-move:disabled { opacity: .25; cursor: default; }
.sp-del { color: #64748b; font-size: .8rem; line-height: 1; padding: .15rem .35rem; border-radius: .4rem; }
.sp-del:hover { color: #f43f5e; background: rgba(244,63,94,.1); }
.script-block-hint { font-size: .76rem; color: #c7d2fe; background: rgba(99,102,241,.08); border-inline-start: 2px solid rgba(129,140,248,.5); padding: .3rem .55rem; border-radius: .4rem; margin-bottom: .4rem; line-height: 1.5; }
.script-block-text {
  width: 100%; resize: vertical; min-height: 2.6rem;
  background: transparent; border: none; color: #e2e8f0;
  font-size: .9rem; line-height: 1.6;
}
.script-block-text:focus { outline: none; }

/* ---- Read-along script (studio screen) ---- */
.read-block {
  --sp: #10b981;
  border-right: 3px solid var(--sp);
  background: rgba(255,255,255,.04);
  border-radius: .6rem; padding: .5rem .75rem;
}
.read-head { display: flex; align-items: center; gap: .45rem; margin-bottom: .2rem; }
.read-check { font-size: 1.05rem; line-height: 1; padding: .1rem; border-radius: .35rem; }
.read-check:hover { background: rgba(255,255,255,.08); }
.read-speaker { font-weight: 800; color: var(--sp); font-size: .85rem; }
.read-edit {
  width: 100%; background: transparent; border: none; color: #e2e8f0;
  font-size: .95rem; line-height: 1.6; resize: vertical; white-space: pre-wrap;
}
.read-edit:focus { outline: none; box-shadow: 0 0 0 2px color-mix(in srgb, var(--sp) 50%, transparent); border-radius: .4rem; }
.read-block.done { opacity: .55; }
.read-block.done .read-speaker { text-decoration: line-through; }

.pad-music { background: rgba(16,185,129,.1); border-color: rgba(16,185,129,.3); }
.pad.selected { background: rgba(251,191,36,.22); border-color: #fbbf24; box-shadow: 0 0 0 2px rgba(251,191,36,.35) inset; }

/* ---- Confetti + rocket (publish celebration) ---- */
.confetti {
  position: fixed; top: -12px; width: 10px; height: 14px; z-index: 70; pointer-events: none;
  border-radius: 2px; animation: confettiFall linear forwards;
}
@keyframes confettiFall {
  0%   { transform: translateY(0) translateX(0) rotate(0); opacity: 1; }
  100% { transform: translateY(105vh) translateX(var(--dx, 0)) rotate(var(--rot, 360deg)); opacity: .9; }
}
.rocket {
  position: fixed; left: 50%; bottom: 8vh; z-index: 71; font-size: 3rem; pointer-events: none;
  animation: rocketUp 1.5s cubic-bezier(.3,.1,.2,1) forwards;
}
@keyframes rocketUp {
  0%   { transform: translate(-50%, 0) scale(.6) rotate(-8deg); opacity: 0; }
  15%  { opacity: 1; }
  100% { transform: translate(-50%, -110vh) scale(1.2) rotate(8deg); opacity: 0; }
}

/* ---- Floating bacteria background (ambient) ---- */
#bacteria-bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
#bacteria-bg .germ {
  position: absolute; bottom: -60px; font-size: var(--sz, 28px); opacity: .16;
  filter: blur(.3px); animation: germRise var(--dur, 22s) linear infinite; animation-delay: var(--dly, 0s);
  will-change: transform, opacity;
}
@keyframes germRise {
  0%   { transform: translateY(0) translateX(0) rotate(0deg); opacity: 0; }
  10%  { opacity: .18; }
  50%  { transform: translateY(-52vh) translateX(var(--drift, 20px)) rotate(180deg); }
  90%  { opacity: .18; }
  100% { transform: translateY(-108vh) translateX(0) rotate(360deg); opacity: 0; }
}
main, header { position: relative; z-index: 1; } /* keep content above the ambient layer */

/* ---- Voice effect buttons ---- */
.voice-btn {
  display: flex; flex-direction: column; align-items: center; gap: .2rem;
  padding: .55rem .3rem; border-radius: .8rem; font-size: .75rem; font-weight: 700;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); color: #cbd5e1;
  transition: background .12s ease, transform .08s ease;
}
.voice-btn .emoji { font-size: 1.3rem; }
.voice-btn:hover { background: rgba(255,255,255,.12); }
.voice-btn.active { background: rgba(56,189,248,.2); border-color: #38bdf8; color: #e0f2fe; }

/* ---- Student-count picker (setup) ---- */
.count-btn {
  width: 3rem; height: 3rem; border-radius: .9rem; font-weight: 800; font-size: 1.1rem;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); color: #cbd5e1;
  transition: background .12s ease, transform .08s ease;
}
.count-btn:hover { background: rgba(255,255,255,.12); }
.count-btn.active { background: #10b981; color: #04231a; border-color: #10b981; }

/* ---- Podcast type cards ---- */
.ptype-card {
  text-align: right; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04);
  border-radius: 1rem; padding: .9rem 1rem; cursor: pointer; transition: border-color .12s ease, background .12s ease;
}
.ptype-card:hover { border-color: #6ee7b7; }
.ptype-card.selected { border-color: #10b981; background: rgba(16,185,129,.12); }
.ptype-label { font-weight: 700; }
.ptype-desc { color: #94a3b8; font-size: .78rem; margin-top: .25rem; }

/* ---- Points badge ---- */
.points-badge {
  display: inline-flex; align-items: center; gap: .25rem; font-weight: 800; font-size: .9rem;
  color: #fde68a; background: rgba(251,191,36,.12); border: 1px solid rgba(251,191,36,.35);
  padding: .25rem .7rem; border-radius: 999px;
}
.points-badge.pulse { animation: pointPulse .5s ease; }
@keyframes pointPulse { 0% { transform: scale(1); } 40% { transform: scale(1.25); } 100% { transform: scale(1); } }

/* ---- Game-style floating "+N" points popup ---- */
.points-pop {
  position: fixed; z-index: 60; pointer-events: none;
  transform: translateX(-50%);
  font-weight: 900; font-size: 1.05rem; color: #fde68a;
  text-shadow: 0 2px 8px rgba(0,0,0,.6);
  white-space: nowrap;
  animation: floatUp 2.2s cubic-bezier(.2,.8,.2,1) forwards;
}
.points-pop.big {
  font-size: 1.5rem; color: #fff;
  text-shadow: 0 0 12px rgba(251,191,36,.9), 0 2px 8px rgba(0,0,0,.6);
}
@keyframes floatUp {
  0%   { opacity: 0; transform: translateX(-50%) translateY(6px) scale(.7); }
  12%  { opacity: 1; transform: translateX(-50%) translateY(-2px) scale(1.15); }
  22%  { transform: translateX(-50%) translateY(-8px) scale(1); }
  70%  { opacity: 1; transform: translateX(-50%) translateY(-14px) scale(1); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-56px) scale(1); }
}

/* ---- Magic points burst at the chat box ---- */
.chat-point-burst {
  position: fixed; z-index: 60; pointer-events: none;
  transform: translate(-50%, -50%);
  display: flex; align-items: center; gap: .3rem;
  font-weight: 900; font-size: 1.5rem; color: #fde68a;
  text-shadow: 0 0 14px rgba(251,191,36,.95), 0 2px 6px rgba(0,0,0,.6);
  animation: cpbFloat 2.8s cubic-bezier(.2,.85,.25,1) forwards;
}
.chat-point-burst .cpb-star { display: inline-block; animation: cpbSpin 1.1s ease; }
.chat-point-burst .cpb-label { font-size: .8rem; font-weight: 800; color: #a7f3d0; }
.chat-point-burst.penalty { color: #fca5a5; text-shadow: 0 0 12px rgba(244,63,94,.7), 0 2px 6px rgba(0,0,0,.6); }
.chat-note {
  position: fixed; z-index: 60; pointer-events: none; transform: translate(-50%, -50%);
  font-weight: 800; font-size: .95rem; color: #e2e8f0; background: rgba(15,23,42,.92);
  border: 1px solid rgba(255,255,255,.18); border-radius: 999px; padding: .3rem .8rem; white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0,0,0,.5); animation: cpbFloat 2.6s cubic-bezier(.2,.85,.25,1) forwards;
}
.chat-point-burst .cpb-spark {
  position: absolute; left: 0; top: 0; font-size: .8rem;
  animation: cpbSpark .9s ease-out forwards; animation-delay: var(--d, 0ms);
}
@keyframes cpbFloat {
  0%   { opacity: 0; transform: translate(-50%,-50%) scale(.3); }
  11%  { opacity: 1; transform: translate(-50%,-62%) scale(1.35); }
  24%  { transform: translate(-50%,-72%) scale(1); }
  75%  { opacity: 1; transform: translate(-50%,-86%) scale(1); }
  100% { opacity: 0; transform: translate(-50%,-150%) scale(1); }
}
@keyframes cpbSpin { 0% { transform: rotate(0) scale(1); } 55% { transform: rotate(210deg) scale(1.5); } 100% { transform: rotate(360deg) scale(1); } }
@keyframes cpbSpark {
  0%   { opacity: 0; transform: rotate(var(--a)) translateX(0) scale(.2); }
  30%  { opacity: 1; }
  100% { opacity: 0; transform: rotate(var(--a)) translateX(46px) scale(1); }
}

/* ---- Onboarding knowledge images ---- */
.onboarding-img-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .6rem; }
.onboarding-img { width: 100%; height: 100%; max-height: 240px; object-fit: cover; border-radius: .9rem; border: 1px solid rgba(255,255,255,.12); transition: transform .15s ease; cursor: zoom-in; }
.onboarding-img:hover { transform: scale(1.02); }

/* ---- Feedback popup ---- */
.feedback-emojis { display: flex; justify-content: center; gap: 1rem; margin: .25rem 0 .75rem; }
.feedback-emoji {
  font-size: 2.4rem; line-height: 1; background: transparent; border: 2px solid transparent;
  border-radius: 999px; padding: .35rem .5rem; cursor: pointer; filter: grayscale(.5) opacity(.7);
  transition: transform .12s ease, filter .12s ease, border-color .12s ease;
}
.feedback-emoji:hover { transform: scale(1.15); filter: none; }
.feedback-emoji.selected { filter: none; transform: scale(1.2); border-color: rgba(251,191,36,.7); background: rgba(251,191,36,.12); }
.feedback-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; }
.feedback-chip {
  font-size: .8rem; color: #cbd5e1; background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14); border-radius: 999px; padding: .3rem .7rem; cursor: pointer;
  transition: background .12s ease, color .12s ease;
}
.feedback-chip:hover { background: rgba(251,191,36,.16); color: #fde68a; }

/* ---- Learning-materials (📚 חומרי עזר) ---- */
.media-btn {
  display: inline-flex; align-items: center; gap: .3rem; font-weight: 700; font-size: .85rem;
  color: #a7f3d0; background: rgba(16,185,129,.14); border: 1px solid rgba(16,185,129,.35);
  padding: .3rem .8rem; border-radius: 999px; cursor: pointer; transition: background .12s ease;
}
.media-btn:hover { background: rgba(16,185,129,.24); }
.modal-card.media-card { max-width: 860px; width: 92vw; max-height: 88vh; overflow-y: auto; text-align: right; }
.media-embed-frame-wrap { position: relative; width: 100%; aspect-ratio: 16 / 10; border-radius: .75rem; overflow: hidden; border: 1px solid rgba(255,255,255,.15); background: #000; }
.media-embed-frame-wrap iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---- Student feedback (admin analytics + session list) ---- */
.feedback-list { display: flex; flex-direction: column; gap: .5rem; margin-top: .5rem; }
.feedback-item { display: flex; align-items: flex-start; gap: .6rem; background: rgba(11,16,32,.4); border: 1px solid rgba(255,255,255,.1); border-radius: .75rem; padding: .5rem .7rem; }
.feedback-emo { font-size: 1.4rem; line-height: 1.4; flex: none; }
.feedback-body { display: flex; flex-direction: column; }
.feedback-names { font-weight: 700; font-size: .8rem; color: #a7f3d0; }
.feedback-text { font-size: .88rem; color: #e2e8f0; }
.session-feedback { display: block; font-size: .82rem; color: #cbd5e1; margin-top: .15rem; }
.session-podcast { display: block; font-weight: 700; font-size: .85rem; color: #fde68a; }
.monitor-chip-podcast { display: block; font-size: .72rem; color: #fde68a; }

/* ---- Read-only shadow (spectator) view ---- */
.modal-card.shadow-card { max-width: 900px; width: 94vw; max-height: 90vh; overflow-y: auto; text-align: right; }
.shadow-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem; margin-bottom: .25rem; }
.shadow-sub { color: #94a3b8; font-size: .8rem; margin-bottom: .5rem; }
.shadow-cols { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 720px) { .shadow-cols { grid-template-columns: 1fr 1fr; } }
.shadow-col { background: rgba(11,16,32,.4); border: 1px solid rgba(255,255,255,.1); border-radius: 1rem; padding: .75rem; }
.shadow-h { font-weight: 800; font-size: .9rem; margin-bottom: .5rem; }
.shadow-block { padding: .35rem 0; border-bottom: 1px solid rgba(255,255,255,.06); font-size: .85rem; }
.shadow-block-spk { font-weight: 700; color: #a7f3d0; margin-left: .35rem; }
.shadow-chat { display: flex; flex-direction: column; gap: .5rem; max-height: 46vh; overflow-y: auto; }
.shadow-play { display: inline-block; margin: .5rem 0; text-decoration: none; }
.monitor-chip-play { display: inline-block; margin-top: .35rem; font-size: .75rem; font-weight: 700; color: #38bdf8; text-decoration: none; }
.monitor-chip-play:hover { text-decoration: underline; }

/* Finished group on the live board — stays put, clearly "done" (not stale-coloured). */
.monitor-chip.mon-done { border-color: rgba(251,191,36,.5); background: rgba(251,191,36,.12); }

/* ---- Admin: onboarding image manager ---- */
.admin-img-row { display: flex; align-items: center; gap: .5rem; }
.admin-img-row .member-input { flex: 1; }
.admin-img-thumb { width: 44px; height: 44px; object-fit: cover; border-radius: .5rem; border: 1px solid rgba(255,255,255,.15); background: rgba(255,255,255,.05); flex: none; }

/* ---- Timers ---- */
#session-timer.warning, .stage-timer.warning { color: #fbbf24; }
#session-timer.danger, .stage-timer.danger { color: #f43f5e; }
.stage-timer { font-size: .82rem; font-weight: 700; color: #94a3b8; }
.stage-timer-msg { color: #fbbf24; }

/* ---- Onboarding quiz ---- */
.quiz-card { border: 1px solid rgba(255,255,255,.1); background: rgba(11,16,32,.4); border-radius: 1rem; padding: 1rem; }
.quiz-q { font-weight: 700; margin-bottom: .6rem; }
.quiz-options { display: grid; gap: .5rem; }
.quiz-opt {
  text-align: right; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05);
  border-radius: .75rem; padding: .55rem .8rem; font-size: .9rem; transition: background .12s ease, border-color .12s ease;
}
.quiz-opt:not(:disabled):hover { background: rgba(255,255,255,.1); border-color: #6ee7b7; }
.quiz-opt.correct { background: rgba(16,185,129,.2); border-color: #10b981; color: #d1fae5; }
.quiz-opt.wrong { background: rgba(244,63,94,.18); border-color: #f43f5e; color: #fecdd3; }
.quiz-opt:disabled { cursor: default; }
.quiz-fb { margin-top: .5rem; font-size: .82rem; font-weight: 700; color: #cbd5e1; }

/* ---- Export celebration ---- */
.celebrate-num { font-size: 3.5rem; font-weight: 900; color: #6ee7b7; line-height: 1; }

/* ---- Admin panel ---- */
.admin-bar { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; margin-bottom: 1rem; }
.admin-status { font-size: .85rem; color: #94a3b8; }
.admin-section { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); border-radius: 1rem; padding: 1rem 1.1rem; }
.admin-h { font-weight: 800; margin-bottom: .75rem; }
.admin-row { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .35rem 0; }
.admin-toggle { justify-content: flex-start; gap: .6rem; }
.admin-label { font-size: .9rem; }
.admin-num { width: 7rem; border-radius: .6rem; background: rgba(11,16,32,.6); border: 1px solid rgba(255,255,255,.12); padding: .35rem .6rem; color: #e2e8f0; }
.admin-textarea { width: 100%; border-radius: .6rem; background: rgba(11,16,32,.6); border: 1px solid rgba(255,255,255,.12); padding: .5rem .7rem; color: #e2e8f0; font-size: .9rem; line-height: 1.6; margin: .35rem 0 .6rem; }
.admin-tpl { border-top: 1px solid rgba(255,255,255,.08); padding-top: .6rem; margin-top: .6rem; }
.admin-tpl:first-of-type { border-top: none; margin-top: 0; }
.admin-tpl-mins { display: grid; grid-template-columns: repeat(2, 1fr); gap: .5rem; margin-top: .5rem; }
.admin-mini { display: flex; align-items: center; justify-content: space-between; gap: .5rem; font-size: .8rem; color: #94a3b8; }
.admin-mini .admin-num { width: 5rem; }
.admin-level { border-top: 1px solid rgba(255,255,255,.08); padding-top: .75rem; margin-top: .75rem; }
.admin-level:first-of-type { border-top: none; margin-top: 0; padding-top: 0; }
.admin-level-label { font-weight: 700; color: #6ee7b7; margin-bottom: .5rem; }
.admin-q-list { display: grid; gap: .75rem; }
.admin-q { border: 1px solid rgba(255,255,255,.1); border-radius: .75rem; padding: .6rem; display: grid; gap: .4rem; }
.admin-del { color: #f87171; justify-self: start; }
.admin-add { margin-top: .6rem; font-size: .85rem; padding: .4rem .9rem; }
.admin-err { color: #f87171; font-size: .85rem; min-height: 1rem; }
.admin-login { max-width: 22rem; margin: 0 auto; display: grid; gap: .6rem; background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); border-radius: 1rem; padding: 1.25rem; }

/* ---- Admin tabs + collapsible group cards ---- */
.admin-bar-sticky { position: sticky; top: 0; z-index: 5; background: rgba(11,16,32,.95); backdrop-filter: blur(6px); padding: .5rem 0; }
.admin-tabs { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.admin-tab {
  padding: .5rem .9rem; border-radius: .7rem; font-weight: 700; font-size: .85rem;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); color: #cbd5e1;
  transition: background .12s ease;
}
.admin-tab:hover { background: rgba(255,255,255,.12); }
.admin-tab.active { background: #10b981; color: #04231a; border-color: #10b981; }
.admin-tabpanel.hidden { display: none; }

.group-card { border: 1px solid rgba(255,255,255,.12); border-radius: .9rem; margin-bottom: .6rem; overflow: hidden; }
.group-card-head { display: flex; align-items: center; gap: .5rem; padding: .6rem .8rem; cursor: pointer; background: rgba(255,255,255,.04); }
.group-card-head:hover { background: rgba(255,255,255,.08); }
.group-card-head.subhead { background: rgba(255,255,255,.02); border-top: 1px solid rgba(255,255,255,.08); margin-top: .25rem; }
.group-card-title { font-weight: 700; flex: 1; }
.group-card .chevron { color: #6ee7b7; font-size: .8rem; width: 1rem; text-align: center; }
.group-card .group-del { margin: 0; padding: .15rem .4rem; }
.group-card-body { padding: .7rem .8rem; display: grid; gap: .5rem; }
.group-card-body.collapsed { display: none; }

/* ---- Onboarding video (responsive 16:9) ---- */
.video-frame { position: relative; width: 100%; padding-top: 56.25%; border-radius: .9rem; overflow: hidden; background: #000; }
.video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---- Age-group picker ---- */
.age-pick-btn {
  padding: .55rem 1.1rem; border-radius: .8rem; font-weight: 700; font-size: .9rem;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); color: #cbd5e1;
  transition: background .12s ease, border-color .12s ease;
}
.age-pick-btn:hover { background: rgba(255,255,255,.12); border-color: #6ee7b7; }
.age-pick-btn.active { background: #10b981; color: #04231a; border-color: #10b981; }
.chosen-grade { font-weight: 700; color: #6ee7b7; }

/* ---- Role + persona assignment ---- */
.role-row {
  --sp: #10b981;
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap;
  border-right: 3px solid var(--sp); background: rgba(255,255,255,.04);
  border-radius: .6rem; padding: .45rem .7rem;
}
.role-name { font-weight: 800; color: var(--sp); min-width: 5rem; }
.role-select {
  background: rgba(11,16,32,.6); border: 1px solid rgba(255,255,255,.14); color: #e2e8f0;
  border-radius: .6rem; padding: .35rem .6rem; font-size: .85rem;
}

/* ---- Session code badge + photo banner + resume modal ---- */
.session-code-badge {
  display: inline-flex; align-items: center; gap: .3rem; font-weight: 800; font-size: .85rem;
  color: #a5f3fc; background: rgba(56,189,248,.12); border: 1px solid rgba(56,189,248,.4);
  padding: .25rem .7rem; border-radius: 999px; cursor: pointer; transition: background .12s ease;
}
.session-code-badge:hover { background: rgba(56,189,248,.22); }
.session-code-badge #session-code-value { font-family: ui-monospace, monospace; letter-spacing: .02em; }

/* "Photograph your code" popup — the big code shown in the modal. */
.code-popup-code {
  font-family: ui-monospace, monospace; font-size: 2rem; font-weight: 800; letter-spacing: .04em;
  color: #6ee7b7; background: rgba(16,185,129,.12);
  border: 1px dashed rgba(16,185,129,.45); border-radius: .8rem; padding: .7rem 1rem;
}

.modal-overlay {
  position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center;
  background: rgba(2,6,23,.75); backdrop-filter: blur(3px); padding: 1rem;
}
.modal-card {
  width: 100%; max-width: 26rem; background: #0f1629; border: 1px solid rgba(255,255,255,.12);
  border-radius: 1.1rem; padding: 1.4rem; box-shadow: 0 24px 60px -12px rgba(0,0,0,.7);
}

/* ---- Admin: recoverable sessions list ---- */
.admin-hint { font-size: .82rem; color: #94a3b8; margin-bottom: .75rem; }
.admin-sessions { display: grid; gap: .5rem; }
.session-row {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  border: 1px solid rgba(255,255,255,.1); background: rgba(11,16,32,.45);
  border-radius: .75rem; padding: .55rem .8rem;
}
.session-info { display: flex; flex-direction: column; gap: .15rem; min-width: 0; }
.session-code { font-family: ui-monospace, monospace; font-weight: 800; color: #a5f3fc; }
.session-meta { font-size: .78rem; color: #94a3b8; }
.session-actions { display: flex; align-items: center; gap: .4rem; flex-shrink: 0; }

/* ---- Admin: quick screen-jump + AI assistant ---- */
.admin-jump-title { margin-top: 1rem; }
.admin-jump { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .4rem; }
.admin-jump-btn { font-size: .82rem; padding: .3rem .7rem; }
.assist-out {
  white-space: pre-wrap; line-height: 1.7; margin-top: .8rem;
  background: rgba(11,16,32,.5); border: 1px solid rgba(255,255,255,.1);
  border-radius: .8rem; padding: .8rem 1rem; color: #e2e8f0; font-size: .9rem;
  min-height: 1rem;
}

/* ---- Admin: analytics (feature L) ---- */
.analytics-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr)); gap: .6rem; margin: .5rem 0 1rem; }
.analytics-card {
  border: 1px solid rgba(255,255,255,.1); background: rgba(11,16,32,.45);
  border-radius: .8rem; padding: .7rem .5rem; text-align: center;
}
.analytics-val { font-size: 1.6rem; font-weight: 800; color: #a5f3fc; line-height: 1.1; }
.analytics-cap { font-size: .75rem; color: #94a3b8; margin-top: .25rem; }
.analytics-h { font-size: .9rem; font-weight: 700; color: #e2e8f0; margin: 1rem 0 .5rem; }
.analytics-bars { display: grid; gap: .45rem; }
.analytics-bar-row { display: grid; grid-template-columns: 5rem 1fr 5rem; align-items: center; gap: .5rem; }
.analytics-bar-label { font-size: .82rem; color: #cbd5e1; }
.analytics-bar-track { height: .85rem; background: rgba(255,255,255,.07); border-radius: 999px; overflow: hidden; }
.analytics-bar-fill { height: 100%; background: linear-gradient(90deg, #38bdf8, #818cf8); border-radius: 999px; min-width: 2px; transition: width .4s ease; }
.analytics-bar-val { font-size: .78rem; color: #94a3b8; text-align: left; }

/* ---- Admin: studio per-item availability (voices / pads) ---- */
.studio-toggle-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: .35rem .6rem; margin: .4rem 0 1rem; }
.studio-toggle { display: flex; align-items: center; gap: .5rem; font-size: .9rem; color: #cbd5e1; cursor: pointer; padding: .25rem .1rem; }
.studio-toggle input { accent-color: #10b981; width: 1rem; height: 1rem; flex-shrink: 0; }

/* ---- Admin: live "horse-race" board (feature M) ---- */
.monitor-wrap { margin-top: .5rem; }
.monitor-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(8.5rem, 1fr); gap: .5rem; overflow-x: auto; padding-bottom: .5rem; }
.monitor-col { border: 1px solid rgba(255,255,255,.08); background: rgba(11,16,32,.35); border-radius: .7rem; padding: .4rem; min-height: 5rem; }
.monitor-col-head { font-size: .8rem; font-weight: 700; color: #94a3b8; text-align: center; padding: .25rem 0 .4rem; border-bottom: 1px solid rgba(255,255,255,.08); margin-bottom: .4rem; }
.monitor-lane { display: grid; gap: .35rem; }
.monitor-chip { border-radius: .6rem; padding: .4rem .5rem; cursor: pointer; border: 1px solid transparent; transition: transform .1s ease; }
.monitor-chip:hover { transform: translateY(-1px); }
.monitor-chip-names { display: block; font-size: .82rem; font-weight: 700; color: #e2e8f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.monitor-chip-meta { display: block; font-size: .7rem; color: #94a3b8; font-family: ui-monospace, monospace; }
.mon-green { background: rgba(16,185,129,.16); border-color: rgba(16,185,129,.4); }
.mon-yellow { background: rgba(245,158,11,.16); border-color: rgba(245,158,11,.45); }
.mon-red { background: rgba(239,68,68,.18); border-color: rgba(239,68,68,.5); }

/* ---- Cast reminder (research screen) ---- */
.cast-reminder { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); border-radius: .8rem; padding: .5rem .7rem; }
.cast-title { font-size: .78rem; font-weight: 700; color: #94a3b8; margin-bottom: .35rem; }
.cast-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.cast-chip {
  --sp: #10b981;
  font-size: .8rem; color: #e2e8f0;
  border: 1px solid color-mix(in srgb, var(--sp) 45%, transparent);
  background: color-mix(in srgb, var(--sp) 12%, transparent);
  padding: .25rem .6rem; border-radius: 999px;
}
.cast-chip strong { color: var(--sp); }

/* ============================================================
   Biomimicry Station — station-specific components
   (appended to the shared MicroPod base; nature/leaf palette)
   ============================================================ */

/* Object-selection grid */
.obj-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: .75rem; }
@media (min-width: 640px) { .obj-grid { grid-template-columns: repeat(3, minmax(0,1fr)); } }
.obj-card {
  text-align: center;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.04);
  border-radius: 1rem;
  padding: 1.1rem .8rem;
  cursor: pointer;
  transition: transform .12s ease, border-color .12s ease, background .12s ease;
}
.obj-card:hover { transform: translateY(-2px); border-color: rgba(16,185,129,.5); background: rgba(16,185,129,.06); }
.obj-card.selected { border-color: #10b981; background: rgba(16,185,129,.12); box-shadow: 0 6px 20px -8px rgba(16,185,129,.5); }
.obj-card .obj-emoji { font-size: 2.6rem; line-height: 1; display: block; margin-bottom: .4rem; }
.obj-card .obj-emoji img { width: 3rem; height: 3rem; object-fit: cover; border-radius: .6rem; display: inline-block; }
.obj-card .obj-name { font-weight: 700; font-size: .95rem; }

/* Phase banner (object + organism reminder inside chat screens) */
.phase-banner {
  display: flex; align-items: center; gap: .6rem;
  border: 1px solid rgba(16,185,129,.3);
  background: rgba(16,185,129,.07);
  border-radius: .9rem; padding: .6rem .85rem; margin-top: .5rem;
}
.phase-banner .pb-emoji { font-size: 1.8rem; }
.phase-banner .pb-emoji img { width: 2rem; height: 2rem; object-fit: cover; border-radius: .4rem; }

/* Blueprint / build document */
.bp-doc { background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.12); border-radius: 1rem; padding: 1.25rem 1.4rem; }
.bp-title { font-size: 1.5rem; font-weight: 800; color: #6ee7b7; }
.bp-section-h { font-weight: 800; margin-top: 1rem; margin-bottom: .35rem; color: #a7f3d0; display: flex; align-items: center; gap: .4rem; }
.bp-materials { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.bp-material { display: flex; gap: .6rem; align-items: baseline; background: rgba(16,185,129,.07); border: 1px solid rgba(16,185,129,.25); border-radius: .6rem; padding: .45rem .7rem; }
.bp-material .bm-name { font-weight: 700; }
.bp-material .bm-qty { color: #6ee7b7; font-size: .8rem; white-space: nowrap; }
.bp-material .bm-use { color: #94a3b8; font-size: .85rem; }
.bp-steps { padding-inline-start: 1.3rem; margin: 0; display: grid; gap: .3rem; }
.bp-steps li { line-height: 1.5; }

/* Inventory chips (shown to students so they know what's on the table) */
.inv-chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.inv-chip { font-size: .8rem; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); border-radius: 999px; padding: .25rem .7rem; }

/* Live board (projector) group cards */
.board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.board-card {
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  border-radius: 1rem; padding: 1.1rem 1.2rem;
  animation: bcpop .5s ease;
}
@keyframes bcpop { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.board-card .bc-obj { font-size: 2.2rem; }
.board-card .bc-obj img { width: 2.4rem; height: 2.4rem; object-fit: cover; border-radius: .5rem; }
.board-card .bc-group { color: #94a3b8; font-size: .85rem; }
.board-card .bc-invention { font-size: 1.15rem; font-weight: 800; color: #6ee7b7; margin-top: .35rem; }
.board-card .bc-idea { color: #cbd5e1; font-size: .9rem; margin-top: .3rem; line-height: 1.5; }
.board-card .bc-materials { margin-top: .6rem; display: flex; flex-wrap: wrap; gap: .3rem; }
.board-card .bc-mat { font-size: .72rem; background: rgba(16,185,129,.12); border: 1px solid rgba(16,185,129,.3); border-radius: 999px; padding: .12rem .55rem; }

/* Admin inventory rows */
.inv-row { display: flex; align-items: center; gap: .6rem; padding: .4rem 0; border-bottom: 1px solid rgba(255,255,255,.06); }
.inv-row .inv-name { flex: 1; }
.inv-row .inv-qty { width: 6rem; }
.inv-row .inv-avail { display: flex; align-items: center; gap: .3rem; font-size: .8rem; color: #94a3b8; white-space: nowrap; }

/* Connection dot for the board */
.conn-dot { display: inline-block; width: .5rem; height: .5rem; border-radius: 999px; background: #64748b; vertical-align: middle; }

/* ---- Admin panel: extra classes used by the biomimicry admin ---- */
.admin-q-card { border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.03); border-radius: .9rem; padding: .9rem 1rem; margin-bottom: .8rem; display: grid; gap: .55rem; }
.admin-q-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.admin-q-title { font-weight: 800; }
.admin-help { color: #94a3b8; font-size: .8rem; margin: .2rem 0 .6rem; line-height: 1.5; }
.admin-row-col { display: flex; flex-direction: column; gap: .3rem; }
.admin-toggle-row { justify-content: space-between; }
.admin-check { width: 1.15rem; height: 1.15rem; accent-color: #10b981; }
.admin-assist-out { margin-top: .8rem; background: rgba(16,185,129,.06); border: 1px solid rgba(16,185,129,.25); border-radius: .8rem; padding: .8rem 1rem; min-height: 2rem; line-height: 1.6; }
.admin-sessions { display: grid; gap: .5rem; }
.admin-session-row { display: flex; align-items: center; gap: .6rem; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.03); border-radius: .7rem; padding: .5rem .7rem; }
.admin-session-info { flex: 1; font-size: .85rem; }
.admin-board-mount { margin-top: 1rem; }

/* Conversation-starter chips under the chat (gentle nudges, not answers) */
.starter-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .5rem; }
.starter-chip {
  font-size: .8rem; cursor: pointer;
  background: rgba(16,185,129,.08); border: 1px solid rgba(16,185,129,.28);
  color: #a7f3d0; border-radius: 999px; padding: .3rem .75rem;
  transition: background .12s ease, transform .1s ease;
}
.starter-chip:hover { background: rgba(16,185,129,.18); }
.starter-chip:active { transform: translateY(1px); }

/* Age-group picker buttons on the object-pick screen */
.agegroup-btn {
  padding: .45rem 1.1rem; border-radius: .7rem; font-weight: 700; font-size: .9rem;
  color: #94a3b8; border: 1px solid rgba(255,255,255,.12); background: rgba(255,255,255,.04);
  cursor: pointer; transition: all .12s ease;
}
.agegroup-btn:hover { border-color: rgba(16,185,129,.5); color: #a7f3d0; }
.agegroup-btn.active { background: #10b981; color: #04231a; border-color: #10b981; }

/* Admin login: forgot-password toggle + inline form */
.admin-forgot-toggle { font-size: .8rem; align-self: flex-start; }
.admin-forgot { display: grid; gap: .5rem; margin-top: .4rem; padding: .8rem; border: 1px solid rgba(255,255,255,.1); border-radius: .7rem; background: rgba(255,255,255,.03); }

/* Admin object image editor: thumbnail + field + upload */
.admin-obj-imgrow { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.admin-obj-thumb {
  width: 3.25rem; height: 3.25rem; flex: 0 0 auto;
  border: 1px solid rgba(255,255,255,.14); border-radius: .6rem;
  background: rgba(255,255,255,.05);
  display: grid; place-items: center; font-size: 1.8rem; overflow: hidden;
}
.admin-obj-thumb img { width: 100%; height: 100%; object-fit: cover; }
.admin-obj-imgrow .member-input { flex: 1; min-width: 8rem; }
