/* myinfo-screen.css */
.myinfo-screen {
  padding: 16px;
  overflow-y: auto;
}
.myinfo-container {
  max-width: 720px;
  margin: 0 auto;
}
.myinfo-heading {
  font-size: 20px;
  margin: 0 0 16px;
  font-weight: 700;
}
.myinfo-profile {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  background: linear-gradient(135deg, #f5f0ff, #fff);
  border-radius: 12px;
  margin-bottom: 16px;
  border: 1px solid #ece3ff;
}
.myinfo-avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: #c9b6f5;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.myinfo-avatar img { width: 100%; height: 100%; object-fit: cover; }
.myinfo-avatar span { color: #fff; font-size: 28px; font-weight: 700; }
.myinfo-name { font-size: 16px; font-weight: 700; color: #2a1d4f; }
.myinfo-email { font-size: 13px; color: #6b6a78; margin-top: 2px; }
.myinfo-joined { font-size: 12px; color: #9a98a8; margin-top: 4px; }
.myinfo-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}
.myinfo-stat-card {
  background: #fff;
  border: 1px solid #ece3ff;
  border-radius: 12px;
  padding: 14px;
  text-align: center;
}
.myinfo-stat-icon { font-size: 22px; margin-bottom: 4px; }
.myinfo-stat-value { font-size: 22px; font-weight: 700; color: #5a3fa0; }
.myinfo-stat-label { font-size: 12px; color: #6b6a78; margin-top: 2px; }
.myinfo-placeholder {
  text-align: center; color: #b0aec0; font-size: 13px;
  padding: 24px; background: #faf8ff; border-radius: 10px;
}
@media (min-width: 480px) {
  .myinfo-stats-grid { grid-template-columns: repeat(4, 1fr); }
}


/* Patch 15: 데이터 관리 섹션 */
.myinfo-section {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  margin-top: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}
.myinfo-section-title {
  font-size: 15px;
  font-weight: 600;
  color: #333;
  margin: 0 0 12px 0;
}
.myinfo-btn {
  width: 100%;
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  background: #4FC3F7;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
}
.myinfo-btn:hover {
  background: #29B6F6;
}
.myinfo-btn:active {
  background: #0288D1;
}
.myinfo-hint {
  font-size: 12px;
  color: #888;
  margin: 8px 0 0 0;
  line-height: 1.5;
}


/* Patch 15-B: Export 옵션 분리 */
.myinfo-btn-primary {
  background: linear-gradient(135deg, #7c5fd3, #9a7ee3);
  color: #fff;
  font-weight: 600;
}
.myinfo-btn-primary:hover { filter: brightness(1.05); }
.myinfo-btn-secondary {
  background: #f5f3fb;
  color: #4a3a7a;
  border: 1px solid #e0d8f5;
  margin-top: 8px;
}
.myinfo-btn-secondary:hover { background: #ece6f9; }
.myinfo-advanced-toggle {
  background: transparent;
  border: none;
  color: #7c5fd3;
  font-size: 13px;
  padding: 10px 4px;
  cursor: pointer;
  text-align: left;
  width: 100%;
  margin-top: 6px;
}
.myinfo-advanced-toggle:hover { color: #5a3fa0; }
.myinfo-advanced-panel {
  margin-top: 4px;
  padding: 12px;
  background: #faf8ff;
  border: 1px dashed #e0d8f5;
  border-radius: 10px;
}
.myinfo-hint {
  font-size: 12px;
  color: #6b6a78;
  margin: 6px 0 0 0;
  line-height: 1.5;
}
.myinfo-hint-sm {
  font-size: 11.5px;
  color: #8b8a98;
  margin: 4px 0 8px 0;
  line-height: 1.45;
}

/* Patch 15-C: 고급 옵션 안내 박스 */
.myinfo-advanced-intro {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  background: #fff8e6;
  border: 1px solid #f5e3a8;
  border-radius: 8px;
  font-size: 12px;
  color: #6b5a20;
  line-height: 1.5;
  margin-bottom: 10px;
}
.myinfo-advanced-intro-icon {
  font-size: 14px;
  flex-shrink: 0;
}
.myinfo-advanced-intro strong {
  color: #5a4a10;
}


/* ===================================== */
/* [P2-A] JLPT chart                     */
/* ===================================== */
.myinfo-jlpt-card {
  margin-top: 16px;
  background: #ffffff;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.myinfo-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.myinfo-card-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: #1f2937;
}
.myinfo-card-icon {
  font-size: 20px;
}

.jlpt-chart {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.jlpt-row {
  display: grid;
  grid-template-columns: 44px 1fr 80px;
  align-items: center;
  gap: 12px;
}

.jlpt-label {
  font-size: 13px;
  font-weight: 700;
  color: #374151;
  text-align: center;
}

.jlpt-bar-track {
  height: 22px;
  background: #f3f4f6;
  border-radius: 11px;
  overflow: hidden;
  position: relative;
}

.jlpt-bar-fill {
  height: 100%;
  border-radius: 11px;
  transition: width 0.4s ease;
  min-width: 4px;
}

/* JLPT 레벨별 색상 */
.jlpt-bar-fill.jlpt-n5 { background: linear-gradient(90deg, #10b981, #34d399); }
.jlpt-bar-fill.jlpt-n4 { background: linear-gradient(90deg, #3b82f6, #60a5fa); }
.jlpt-bar-fill.jlpt-n3 { background: linear-gradient(90deg, #8b5cf6, #a78bfa); }
.jlpt-bar-fill.jlpt-n2 { background: linear-gradient(90deg, #f59e0b, #fbbf24); }
.jlpt-bar-fill.jlpt-n1 { background: linear-gradient(90deg, #ef4444, #f87171); }
.jlpt-bar-fill.jlpt-none { background: linear-gradient(90deg, #9ca3af, #d1d5db); }

.jlpt-count {
  font-size: 13px;
  font-weight: 700;
  color: #111827;
  text-align: right;
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 4px;
}
.jlpt-share {
  font-size: 11px;
  font-weight: 500;
  color: #6b7280;
}

.jlpt-empty {
  text-align: center;
  color: #6b7280;
  font-size: 13px;
  padding: 20px 10px;
}

.jlpt-row:hover .jlpt-bar-fill {
  filter: brightness(1.05);
}


/* ===== [P2-B] 출석 캘린더 ===== */
.myinfo-attend-card {
  background: #fff;
  border-radius: 12px;
  padding: 18px 16px 20px;
  margin-top: 14px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
}
.myinfo-attend-card .myinfo-card-title {
  font-size: 14px;
  color: #4b5563;
  font-weight: 600;
  margin: 0 0 14px;
  line-height: 1.4;
}
.attend-calendar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}
.attend-header {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.attend-dow {
  text-align: center;
  font-size: 11px;
  color: #9ca3af;
  font-weight: 600;
  padding: 2px 0;
}
.attend-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.attend-cell {
  aspect-ratio: 1 / 1;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 500;
  position: relative;
  cursor: default;
  transition: transform 0.12s ease;
}
.attend-cell:hover {
  transform: scale(1.08);
}
.attend-day-num {
  opacity: 0.75;
  user-select: none;
}
.attend-empty {
  background: #f3f4f6;
  color: #9ca3af;
}
.attend-studied {
  background: linear-gradient(135deg, #8b5cf6, #a78bfa);
  color: #fff;
}
.attend-studied .attend-day-num {
  opacity: 0.95;
  font-weight: 600;
}
.attend-future {
  background: transparent;
  color: #d1d5db;
  border: 1px dashed #e5e7eb;
}
.attend-today {
  outline: 2px solid #f59e0b;
  outline-offset: 1px;
  box-shadow: 0 0 0 1px #fff inset;
}
.attend-today .attend-day-num {
  font-weight: 700;
}

/* 연속 학습일 카드의 일 단위 표기 */
.myinfo-stat-value .myinfo-stat-unit {
  font-size: 0.6em;
  font-weight: 500;
  margin-left: 2px;
  color: inherit;
  opacity: 0.7;
}

/* BugE-5: 자동 백업 토글 UI */
.myinfo-autobackup-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  padding: 12px;
  border-radius: 10px;
  background: #f5f2fb;
}
.myinfo-autobackup-label {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: #2a1d4f;
}
.myinfo-autobackup-meta {
  font-size: 12px;
  color: #6b6a78;
  margin-top: 6px;
  font-weight: 400;
}
.myinfo-toggle {
  position: relative;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
  cursor: pointer;
}
.myinfo-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}
.myinfo-toggle-slider {
  position: absolute;
  inset: 0;
  background: #c9c3d6;
  border-radius: 26px;
  transition: background 0.2s;
}
.myinfo-toggle-slider::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.myinfo-toggle input:checked + .myinfo-toggle-slider {
  background: #5a3fa0;
}
.myinfo-toggle input:checked + .myinfo-toggle-slider::before {
  transform: translateX(20px);
}
/* Phase 3-B: 문의하기 섹션 (Contact) */
.myinfo-contact-section {
  margin-top: 16px;
}

.myinfo-contact-desc {
  font-size: 13px;
  color: #555;
  line-height: 1.6;
  margin: 0 0 12px 0;
}

.myinfo-contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: linear-gradient(135deg, #7d5fff 0%, #a78bfa 100%);
  color: #fff;
  text-decoration: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  transition: filter 0.15s ease, transform 0.1s ease;
}

.myinfo-contact-btn:hover {
  filter: brightness(1.08);
}

.myinfo-contact-btn:active {
  transform: scale(0.98);
}

/* ============================================ */
/* [P2-B] Empty State CTA (2026-07-27)          */
/* ============================================ */
.myinfo-stat-cta {
  display: block;
  margin-top: 8px;
  font-size: 11px;
  font-weight: 600;
  color: #5a3fa0;
  text-decoration: none;
  cursor: pointer;
  transition: opacity 0.15s;
}
.myinfo-stat-cta:hover { opacity: 0.7; }
.myinfo-stat-cta:active { opacity: 0.5; }

.myinfo-empty-state {
  padding: 28px 20px;
  text-align: center;
  background: #faf8ff;
  border-radius: 10px;
}
.myinfo-empty-icon {
  font-size: 36px;
  margin-bottom: 10px;
}
.myinfo-empty-title {
  font-size: 15px;
  font-weight: 700;
  color: #5a3fa0;
  margin-bottom: 6px;
}
.myinfo-empty-desc {
  font-size: 13px;
  color: #6b6a78;
  margin-bottom: 14px;
  line-height: 1.5;
}
.myinfo-empty-cta {
  padding: 10px 24px;
  background: #5a3fa0;
  color: #fff;
  border: none;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.myinfo-empty-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(90, 63, 160, 0.25);
}
.myinfo-empty-cta:active { transform: translateY(0); }

/* ==========================================================================
   [Row 11] 대시보드 지표 보강 (2026-07-29)
   - ③ 오늘의 성취 배너
   - ① 이번 주 성장 카드
   - ② 캐릭터별 대화 TOP 5
   ========================================================================== */

/* ─── ③ 오늘의 성취 배너 ─────────────────────────────────────────── */
.myinfo-today-banner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  margin: 12px 0 20px;
  border-radius: 14px;
  background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
  color: #fff;
  box-shadow: 0 4px 12px rgba(124, 58, 237, 0.25);
}

.myinfo-today-banner.myinfo-today-empty {
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  color: #6b7280;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.myinfo-today-icon {
  font-size: 32px;
  line-height: 1;
  flex-shrink: 0;
}

.myinfo-today-content {
  flex: 1;
  min-width: 0;
}

.myinfo-today-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.myinfo-today-subtitle {
  font-size: 13px;
  opacity: 0.85;
  line-height: 1.4;
}

.myinfo-today-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  font-size: 13px;
  font-weight: 600;
}

.myinfo-today-stats span {
  white-space: nowrap;
}

/* ─── ① 이번 주 성장 카드 ────────────────────────────────────────── */
.myinfo-weekly-card {
  margin-top: 16px;
}

.myinfo-weekly-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.myinfo-weekly-item {
  padding: 16px;
  border-radius: 12px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  text-align: center;
}

.myinfo-weekly-label {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 8px;
  font-weight: 500;
}

.myinfo-weekly-value {
  font-size: 28px;
  font-weight: 800;
  color: #111827;
  line-height: 1;
  margin-bottom: 8px;
}

.myinfo-weekly-unit {
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
  margin-left: 2px;
}

.myinfo-weekly-diff {
  font-size: 12px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  display: inline-block;
}

.myinfo-weekly-diff.positive {
  color: #059669;
  background: #d1fae5;
}

.myinfo-weekly-diff.negative {
  color: #dc2626;
  background: #fee2e2;
}

.myinfo-weekly-diff.neutral {
  color: #6b7280;
  background: #f3f4f6;
}

/* ─── ② 캐릭터별 TOP 5 ──────────────────────────────────────────── */
.myinfo-char-card {
  margin-top: 16px;
}

.myinfo-char-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.myinfo-char-item {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 4px 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}

.myinfo-char-rank {
  grid-row: 1 / 3;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 13px;
  color: #fff;
  background: #9ca3af;
}

.myinfo-char-item:nth-child(1) .myinfo-char-rank {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.4);
}

.myinfo-char-item:nth-child(2) .myinfo-char-rank {
  background: linear-gradient(135deg, #d1d5db, #9ca3af);
}

.myinfo-char-item:nth-child(3) .myinfo-char-rank {
  background: linear-gradient(135deg, #d97706, #b45309);
}

.myinfo-char-name {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.myinfo-char-stats {
  display: flex;
  gap: 8px;
  font-size: 12px;
  color: #6b7280;
  font-weight: 600;
  white-space: nowrap;
}

.myinfo-char-count {
  color: #7c3aed;
}

.myinfo-char-bar {
  grid-column: 2 / 4;
  height: 6px;
  background: #e5e7eb;
  border-radius: 3px;
  overflow: hidden;
}

.myinfo-char-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #7c3aed, #a78bfa);
  border-radius: 3px;
  transition: width 0.4s ease;
}

/* ─── 반응형 (≤480px) ───────────────────────────────────────────── */
@media (max-width: 480px) {
  .myinfo-today-banner {
    padding: 14px 16px;
    gap: 12px;
  }
  .myinfo-today-icon { font-size: 28px; }
  .myinfo-today-title { font-size: 14px; }
  .myinfo-today-subtitle { font-size: 12px; }
  .myinfo-today-stats { font-size: 12px; gap: 8px 12px; }
  
  .myinfo-weekly-value { font-size: 24px; }
  .myinfo-weekly-item { padding: 12px; }
  
  .myinfo-char-item { padding: 8px 10px; gap: 4px 10px; }
  .myinfo-char-name { font-size: 14px; }
  .myinfo-char-stats { font-size: 11px; }
}
/* [Row 11 Phase 4] 캐릭터 병기 이름 (일본어 + 한글) */
.myinfo-char-name {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
}

.myinfo-char-name-ja {
  font-size: 15px;
  font-weight: 700;
  color: #111827;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.myinfo-char-name-ko {
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .myinfo-char-name-ja { font-size: 14px; }
  .myinfo-char-name-ko { font-size: 11px; }
}