/* ============================================================
   Placement Test — NihongoDo (Poin 5.4)
   ============================================================ */

.placement-wrap {
  max-width: 640px;
  margin: 0 auto;
  padding: var(--space-xl) var(--space-md);
}

/* ── Header progress ─────────────────────────────────── */
.placement-header {
  margin-bottom: var(--space-lg);
}

.pt-progress-wrap {
  height: 6px;
  background: var(--surface-2);
  border-radius: 99px;
  overflow: hidden;
  margin-bottom: var(--space-sm);
}

.pt-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--shu-light));
  border-radius: 99px;
  transition: width 0.4s ease;
}

.pt-meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 13px;
  color: var(--text-faint);
}

.pt-level-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.level-n5 {
  background: var(--success-muted, rgba(47, 139, 99, 0.2));
  color: var(--success, #2f8b63);
}
.level-n4 {
  background: rgba(74, 109, 161, 0.2);
  color: var(--accent);
}
.level-n3 {
  background: rgba(203, 161, 53, 0.2);
  color: var(--warning, #cba135);
}
.level-n2 {
  background: rgba(200, 69, 46, 0.15);
  color: var(--error, #c8452e);
}
.level-n1 {
  background: rgba(128, 0, 255, 0.15);
  color: #9b59b6;
}

.pt-type {
  color: var(--text-faint);
}

/* ── Kartu soal ──────────────────────────────────────── */
.placement-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.pt-prompt {
  font-size: clamp(2.2rem, 8vw, 3.5rem);
  font-family: var(--font-jp);
  text-align: center;
  line-height: 1.2;
  color: var(--text-primary);
  padding: var(--space-md) 0;
}

.pt-hint {
  text-align: center;
  font-size: 12px;
  margin-top: calc(-1 * var(--space-md));
}

/* ── Pilihan ─────────────────────────────────────────── */
.pt-choices {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
}

.pt-choice {
  background: var(--surface-2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  font-size: 15px;
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s,
    transform 0.1s;
  color: var(--text-primary);
  min-height: 44px;
  text-align: center;
}

.pt-choice:hover:not(:disabled) {
  background: var(--surface-3, var(--surface-2));
  border-color: var(--accent);
  transform: translateY(-1px);
}

.pt-choice:disabled {
  cursor: default;
}

.pt-correct {
  background: rgba(47, 139, 99, 0.18) !important;
  border-color: var(--success, #2f8b63) !important;
  color: var(--success, #2f8b63) !important;
}

.pt-wrong {
  background: rgba(200, 69, 46, 0.15) !important;
  border-color: var(--error, #c8452e) !important;
  color: var(--error, #c8452e) !important;
}

/* ── Feedback ────────────────────────────────────────── */
.pt-feedback {
  text-align: center;
  font-weight: 600;
  font-size: 15px;
  padding: var(--space-sm);
  border-radius: var(--radius-sm);
}

.pt-fb-correct {
  background: rgba(47, 139, 99, 0.12);
  color: var(--success, #2f8b63);
}

.pt-fb-wrong {
  background: rgba(200, 69, 46, 0.1);
  color: var(--error, #c8452e);
}

/* ── Next button ─────────────────────────────────────── */
.pt-next {
  align-self: flex-end;
}

/* ── Hasil ───────────────────────────────────────────── */
.placement-result {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  align-items: center;
}

.pr-icon {
  font-size: 3rem;
}

.pr-title {
  font-size: 1.5rem;
  font-family: var(--font-display);
  color: var(--text-primary);
  margin: 0;
}

.pr-sub {
  color: var(--text-faint);
  font-size: 15px;
}

.pr-rec {
  background: var(--surface-2);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-lg);
  width: 100%;
}

.pr-rec-label {
  font-size: 12px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}

.pr-rec-level {
  font-size: 2.5rem;
  font-family: var(--font-display);
  font-weight: 800;
  margin: var(--space-xs) 0;
}

.pr-rec-desc {
  font-size: 13px;
  color: var(--text-secondary);
}

.pr-breakdown {
  width: 100%;
  text-align: left;
}

.pr-breakdown h3 {
  font-size: 13px;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-sm);
}

.pr-row {
  display: grid;
  grid-template-columns: 40px 1fr 44px;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: 6px;
}

.pr-lbl {
  font-size: 12px;
  font-weight: 700;
}

.pr-bar-bg {
  height: 8px;
  background: var(--surface-2);
  border-radius: 99px;
  overflow: hidden;
}

.pr-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 99px;
  transition: width 0.6s ease;
}

.pr-pct {
  font-size: 12px;
  color: var(--text-faint);
  text-align: right;
}

.pr-actions {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
  justify-content: center;
  width: 100%;
}

.pr-note {
  font-size: 12px;
}

/* ── Onboarding intro ────────────────────────────────── */
.placement-intro {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-xl);
}

.pi-icon {
  font-size: 3rem;
}

@media (max-width: 480px) {
  .pt-choices {
    grid-template-columns: 1fr;
  }
}
