/* --- Settings --- */
.settings-section {
  background: rgba(255, 255, 255, 0.55);
  border-radius: var(--radius-card);
  padding: 16px 18px;
  margin-bottom: 14px;
}
.settings-section__title { font-size: 16px; font-weight: 700; margin: 0 0 12px; color: var(--fg); }
.settings-section--dev {
  background: rgba(255, 240, 220, 0.4);
  border: 1px dashed rgba(255, 138, 76, 0.35);
}
.settings-avatar { display: flex; align-items: center; gap: 16px; }
.settings-avatar__circle {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  border: 3px solid var(--accent);
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(255, 138, 76, 0.25);
}
.settings-avatar__img { width: 100%; height: 100%; object-fit: cover; }
.settings-avatar__info { display: flex; flex-direction: column; gap: 6px; }
.settings-avatar__name { font-size: 18px; font-weight: 700; color: var(--fg); }
.settings-avatar__btn { align-self: flex-start; padding: 6px 16px; font-size: 13px; }

/* Record hero (頭像 + 等級) */
.record-hero {
  display: flex; align-items: center; gap: 14px;
  background: linear-gradient(135deg, rgba(255, 220, 180, 0.5), rgba(255, 255, 255, 0.6));
  border: 2px solid rgba(255, 138, 76, 0.25);
  border-radius: var(--radius-card);
  padding: 14px 18px;
  margin-bottom: 14px;
}
.record-hero__avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--accent);
  flex-shrink: 0;
}
.record-hero__avatar img { width: 100%; height: 100%; object-fit: cover; }
.record-hero__info { display: flex; flex-direction: column; gap: 4px; }
.record-hero__lv { font-size: 16px; font-weight: 800; color: var(--fg); }
.record-hero__exp { font-size: 13px; color: var(--fg-soft); }

/* Avatar dialog */
.avatar-dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(58, 42, 26, 0.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 9500;
  padding: 16px;
  animation: fade-in-overlay 0.25s ease-out forwards;
}
.avatar-dialog {
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  background: var(--bg);
  border-radius: var(--radius-card);
  border: 3px solid var(--accent);
  display: flex; flex-direction: column;
  box-shadow: 0 16px 40px rgba(0,0,0,0.3);
  overflow: hidden;
  animation: scale-up-card 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
.avatar-dialog__header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(58, 42, 26, 0.1);
}
.avatar-dialog__title { font-size: 18px; font-weight: 800; margin: 0; color: var(--fg); }
.avatar-dialog__close {
  background: none; border: none;
  font-size: 20px; font-weight: 800;
  color: var(--fg-soft); cursor: pointer;
  padding: 4px 10px; border-radius: 8px;
}
.avatar-dialog__close:hover { background: rgba(58, 42, 26, 0.06); }
.avatar-dialog__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 14px;
  overflow-y: auto;
  flex: 1;
}
.avatar-option {
  background: rgba(255, 255, 255, 0.65);
  border: 2px solid transparent;
  border-radius: 14px;
  padding: 8px 6px;
  cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  transition: transform 0.15s, border-color 0.2s, box-shadow 0.2s;
}
.avatar-option:active { transform: scale(0.96); }
.avatar-option:hover { border-color: rgba(255, 138, 76, 0.4); }
.avatar-option--selected {
  border-color: var(--accent);
  background: rgba(255, 138, 76, 0.12);
  box-shadow: 0 4px 10px rgba(255, 138, 76, 0.25);
}
.avatar-option__img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; }
.avatar-option__name { font-size: 11px; font-weight: 600; color: var(--fg-soft); }


.settings-hint { font-size: 12px; color: var(--fg-soft); margin-top: 6px; }
.settings-dev-info { font-size: 12px; color: var(--fg-soft); margin-bottom: 8px; }
.settings-dev-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.btn--danger {
  width: 100%;
  background: rgba(220, 100, 80, 0.92);
  color: #fff;
  border: none;
  padding: 12px 18px;
  border-radius: var(--radius-button);
  font-weight: 700;
  cursor: pointer;
}
.btn--danger:active { transform: scale(0.98); }

/* --- Per-step EXP flash (review answers) --- */
.exp-flash {
  position: fixed;
  top: 22%;
  left: 50%;
  transform: translateX(-50%) scale(0.6);
  font-size: 44px;
  font-weight: 900;
  color: var(--accent);
  background: rgba(255, 255, 255, 0.95);
  border: 3px solid var(--accent);
  border-radius: 24px;
  padding: 12px 28px;
  box-shadow: 0 6px 18px rgba(255, 138, 76, 0.35);
  z-index: 9000;
  pointer-events: none;
  text-align: center;
  animation: exp-flash-pop 1.7s cubic-bezier(0.19, 1, 0.22, 1) forwards;
}
.exp-flash__slots {
  font-size: 22px;
  font-weight: 700;
  color: #d9842b;
  margin-top: 6px;
  letter-spacing: 2px;
}
.exp-flash__hint {
  font-size: 14px;
  font-weight: 600;
  color: #555;
  margin-top: 4px;
}
@keyframes exp-flash-pop {
  0%   { transform: translateX(-50%) translateY(0) scale(0.5);  opacity: 0; }
  15%  { transform: translateX(-50%) translateY(-8px) scale(1.15); opacity: 1; }
  75%  { transform: translateX(-50%) translateY(-18px) scale(1);   opacity: 1; }
  100% { transform: translateX(-50%) translateY(-60px) scale(0.95); opacity: 0; }
}

