/* ============================================================
   report-card.css — kana mastery "Report Card" modal, ported
   from the legacy homepage. Shareable Wordle-style progress
   summary per kana family. Theme-token based (new site tokens
   with legacy fallbacks). Used on the homepage (/).
   ============================================================ */

.report-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  padding: 20px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.report-modal-backdrop.visible {
  opacity: 1;
  pointer-events: auto;
}

.report-modal {
  max-width: 420px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin: auto;
  padding: 20px 0;
  flex-shrink: 0;
}

.report-card {
  width: 100%;
  background: var(--bg, #fbf6ea);
  border: 1px solid var(--container-border, #d9cdb4);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.report-header {
  text-align: center;
  margin-bottom: 20px;
  position: relative;
}

.report-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text, #1f1a1a);
  margin: 0 0 8px 0;
}

.report-overall {
  font-size: 0.85rem;
  color: var(--text-muted, #54403a);
}

.report-overall strong {
  color: var(--accent, #b32a2a);
  font-size: 1.1rem;
}

.report-close {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: var(--text-faint, #7a6260);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  border-radius: 8px;
}
@media (hover: hover) { .report-close:hover { color: var(--accent, #b32a2a); } }

.report-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.report-loading,
.report-error {
  text-align: center;
  color: var(--text-muted, #54403a);
  font-size: 0.9rem;
  padding: 24px 0;
}

.report-family {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
}

.report-family-name {
  width: 36px;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted, #54403a);
  text-align: right;
  flex-shrink: 0;
}

.report-bar-track {
  flex: 1;
  height: 18px;
  background: var(--subtle-bg, #efe6d3);
  border-radius: 9px;
  overflow: hidden;
  position: relative;
}

.report-bar-fill {
  height: 100%;
  border-radius: 9px;
  background: var(--accent, #b32a2a);
  transition: width 0.6s ease;
  min-width: 0;
}

.report-bar-fill.complete {
  background: var(--green, #2f8f5b);
}

.report-bar-label {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 0.6rem;
  font-weight: 600;
  color: var(--text-muted, #54403a);
}

.report-family-chars {
  display: flex;
  gap: 3px;
  flex-shrink: 0;
}

.report-char-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--subtle-bg, #efe6d3);
  border: 1px solid var(--container-border, #d9cdb4);
}

.report-char-dot.in-progress {
  background: var(--accent, #b32a2a);
  border-color: var(--accent, #b32a2a);
}

.report-char-dot.learned {
  background: var(--green, #2f8f5b);
  border-color: var(--green, #2f8f5b);
}

.report-footer {
  text-align: center;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--container-border, #d9cdb4);
}

.report-site {
  font-size: 0.7rem;
  color: var(--text-faint, #7a6260);
  letter-spacing: 0.02em;
}

.report-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.report-share-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--subtle-border, #d9cdb4);
  background: var(--bg, #fbf6ea);
  color: var(--text, #1f1a1a);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.report-share-btn:hover {
  border-color: var(--text, #1f1a1a);
  color: var(--text, #1f1a1a);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transform: translateY(-1px);
}
