/*
  4P3X MuseumVerse™ Practice App
  Clear, options-first training experience. Public wording uses App.
*/

.practice-body {
  --practice-blue: #7dd3fc;
}

.practice-topbar .brand-logo {
  max-height: 58px;
}

.practice-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: 1rem;
  align-items: stretch;
}

.practice-logo-card {
  display: grid;
  place-items: center;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,0.05);
}

.practice-logo-card img {
  width: min(100%, 360px);
  max-height: 270px;
  object-fit: contain;
}

.lesson-progress {
  display: grid;
  gap: 0.6rem;
}

.progress-bar {
  overflow: hidden;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
}

.progress-fill {
  height: 100%;
  width: var(--progress, 0%);
  background: linear-gradient(90deg, var(--green), var(--gold), var(--purple));
  border-radius: inherit;
}

.ai-card {
  position: relative;
  border: 1px solid rgba(216,180,91,0.45);
  border-radius: var(--radius);
  padding: 1rem;
  background:
    radial-gradient(circle at top left, rgba(216,180,91,0.22), transparent 13rem),
    rgba(255,255,255,0.055);
}

.ai-face {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  margin-bottom: 0.75rem;
  font-size: 2rem;
  font-weight: 900;
  color: #160f04;
  background: linear-gradient(135deg, var(--gold), var(--gold-soft));
  border: 1px solid rgba(255,255,255,0.3);
  box-shadow: 0 14px 35px rgba(0,0,0,0.34);
}

.ai-card h2,
.ai-card h3 {
  margin-top: 0;
}

.ai-speech {
  white-space: pre-line;
  font-size: 1.08rem;
  line-height: 1.55;
}

.lesson-list {
  display: grid;
  gap: 0.75rem;
}

.lesson-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.8rem;
  align-items: center;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,0.055);
  text-decoration: none;
}

.lesson-number {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 16px;
  background: rgba(216,180,91,0.18);
  color: var(--gold-soft);
  font-weight: 900;
}

.lesson-row.done .lesson-number {
  background: rgba(72,209,122,0.18);
  color: var(--green);
}

.lesson-row strong {
  display: block;
  font-size: 1.08rem;
}

.lesson-row small {
  color: var(--muted);
}

.lesson-complete-pill {
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  background: rgba(72,209,122,0.16);
  color: var(--green);
  font-weight: 850;
}

.practice-steps {
  display: grid;
  gap: 0.7rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.practice-steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: start;
  padding: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,0.05);
}

.step-dot {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--gold);
  color: #160f04;
  font-weight: 900;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
}

.choice-card,
.option-chip {
  border: 1px solid var(--line);
  border-radius: 18px;
  min-height: 68px;
  padding: 0.9rem 1rem;
  color: var(--text);
  background: rgba(255,255,255,0.07);
  font-weight: 850;
  text-align: left;
  text-decoration: none;
}

.choice-card:hover,
.option-chip:hover,
.choice-card:focus,
.option-chip:focus {
  outline: 3px solid rgba(216,180,91,0.35);
  border-color: rgba(216,180,91,0.75);
}

.option-chip.selected {
  background: linear-gradient(135deg, rgba(216,180,91,0.95), rgba(244,222,154,0.92));
  color: #170f04;
}

.lesson-demo {
  border: 1px dashed rgba(216,180,91,0.45);
  border-radius: var(--radius);
  padding: 1rem;
  background: rgba(216,180,91,0.06);
}

.practice-mini-screen {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem;
  background: rgba(0,0,0,0.18);
}

.review-box {
  border-left: 5px solid var(--gold);
  border-radius: 16px;
  padding: 1rem;
  background: rgba(216,180,91,0.1);
  white-space: pre-line;
}

.local-safe-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border: 1px solid rgba(72,209,122,0.35);
  border-radius: 999px;
  padding: 0.45rem 0.75rem;
  color: var(--green);
  background: rgba(72,209,122,0.11);
  font-weight: 850;
}

.show-next-active .next-press {
  outline: 5px solid rgba(72,209,122,0.55);
  box-shadow: 0 0 0 10px rgba(72,209,122,0.12), var(--shadow);
  animation: pulseNext 1.2s ease-in-out infinite;
}

@keyframes pulseNext {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

.install-help {
  display: none;
}

.install-help.show {
  display: block;
}

.practice-record-list {
  display: grid;
  gap: 0.8rem;
}

.practice-record {
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,0.05);
}

.practice-record strong {
  display: block;
  color: var(--gold-soft);
}

@media (max-width: 760px) {
  .practice-hero-grid,
  .lesson-row {
    grid-template-columns: 1fr;
  }

  .lesson-complete-pill {
    justify-self: start;
  }
}


.safe-steps-panel {
  border-color: rgba(72,209,122,0.38);
  background:
    radial-gradient(circle at top right, rgba(72,209,122,0.16), transparent 16rem),
    rgba(255,255,255,0.05);
}

.practice-record .actions {
  margin-top: 0.7rem;
}

/* 4P3X AI™ next-button and Practice App sync update */
.ai-next-panel {
  border-color: rgba(72, 209, 122, 0.48);
  background: linear-gradient(135deg, rgba(72, 209, 122, 0.12), rgba(159, 122, 234, 0.1)), rgba(18, 16, 14, 0.94);
}
.next-action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}
.next-action-card {
  padding: 1rem;
  border: 1px solid rgba(232, 198, 111, 0.28);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.055);
}
.next-action-card p { margin: .75rem 0 0; color: var(--muted); }
.ai-next-highlight {
  outline: 4px solid rgba(72, 209, 122, 0.72) !important;
  outline-offset: 5px;
  box-shadow: 0 0 0 8px rgba(72, 209, 122, 0.12), 0 18px 46px rgba(0, 0, 0, .32) !important;
}
.qr-sync-box {
  display: grid;
  place-items: center;
  gap: 1rem;
  min-height: 180px;
  padding: 1rem;
  margin: 1rem 0;
  border: 1px dashed rgba(232, 198, 111, 0.45);
  border-radius: 22px;
  background: rgba(255,255,255,.05);
  text-align: center;
}
.qr-sync-box svg { width: min(320px, 92vw); height: auto; border-radius: 18px; padding: .75rem; background: #fff; }
.scanner-box { margin-top: 1rem; padding: 1rem; border: 1px solid rgba(72, 209, 122, 0.4); border-radius: 20px; background: rgba(72, 209, 122, 0.08); }
.scanner-box video { width: min(420px, 100%); border-radius: 18px; display: block; margin: 0 auto 1rem; }
.field textarea[readonly] { min-height: 160px; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .9rem; }
@media print { .ai-next-panel, .qr-sync-box, .scanner-box { display: none !important; } }
