/* ============================================================
   Daily Goal Widget + Onboarding — NihongoDo (Poin 5.5 & 5.6)
   ============================================================ */

/* ── Overlay / Modal ─────────────────────────────────── */
.onb-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: var(--z-priority);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  animation: onbIn 0.3s ease;
}

.onb-overlay.onb-out {
  animation: onbOut 0.35s ease forwards;
}

@keyframes onbIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes onbOut {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

.onb-modal {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  max-width: 480px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  animation: onbModalIn 0.3s ease;
}

@keyframes onbModalIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.onb-header {
  text-align: center;
}

.onb-logo {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--shu-light);
  margin-bottom: var(--space-xs);
}

.onb-title {
  font-size: 1.3rem;
  font-family: var(--font-display);
  color: var(--text-primary);
  margin: 0 0 4px;
}

.onb-sub {
  font-size: 14px;
  margin: 0;
}

.onb-section {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.onb-section-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* ── Goal buttons ────────────────────────────────────── */
.onb-goal-choices {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.onb-goal-btn {
  display: grid;
  grid-template-columns: 2rem 1fr;
  grid-template-rows: auto auto;
  column-gap: var(--space-sm);
  align-items: center;
  background: var(--surface-2);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-sm) var(--space-md);
  cursor: pointer;
  transition:
    background 0.15s,
    border-color 0.15s;
  text-align: left;
  color: var(--text-primary);
}

.onb-goal-btn:hover {
  border-color: var(--accent);
  background: var(--surface-3, var(--surface-2));
}

.onb-goal-btn.selected {
  border-color: var(--accent);
  background: rgba(74, 109, 161, 0.12);
}

.onb-goal-icon {
  grid-row: 1 / 3;
  font-size: 1.4rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.onb-goal-label {
  font-weight: 600;
  font-size: 15px;
  grid-column: 2;
}

.onb-goal-desc {
  font-size: 12px;
  grid-column: 2;
}

.onb-test-row {
  display: flex;
  gap: var(--space-sm);
  align-items: center;
  flex-wrap: wrap;
}

.onb-start {
  width: 100%;
  justify-content: center;
  padding: var(--space-md);
  font-size: 1rem;
}

/* ── Daily Goal Widget (homepage) ────────────────────── */
.dg-widget {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.dg-top {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.dg-icon {
  font-size: 1.6rem;
  flex-shrink: 0;
}

.dg-info {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.dg-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-faint);
}

.dg-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
}

.dg-done {
  font-size: 13px;
  font-weight: 700;
  color: var(--success, #2f8b63);
  white-space: nowrap;
}

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

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

.dg-bar-done {
  background: var(--success, #2f8b63);
}

.dg-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* ── Streak Freeze Widget ────────────────────────────── */
.sf-widget {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.sf-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

.sf-info {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.sf-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-faint);
}

.sf-count {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
}

.sf-note {
  font-size: 12px;
  margin: 2px 0 0;
}
