/* Primary hubs stay focused on the next action. Collections and details use
   explicit destinations; native view scrolling remains an accessibility fallback. */
.view.profile-focus {
  min-height: 100%; padding-block: max(16px, env(safe-area-inset-top)) 16px; gap: 16px;
}

/* You: one keepsake and a small set of destinations, not a growing dashboard. */
.profile-focus .profile-keepsake {
  display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 16px; align-items: center;
  padding: 16px; border: 1px solid var(--hairline); border-radius: 10px; background: var(--card);
}
.profile-focus .profile-keepsake > .learning-illustration { display: block; width: 104px; height: 104px; }
.profile-focus .profile-keepsake-copy { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; }
.profile-focus .profile-keepsake h2 { font-size: 22px; line-height: 1.1; letter-spacing: -.04em; }
.profile-focus .profile-keepsake p { font-size: 14px; line-height: 1.4; margin-top: 8px; }
.profile-focus .profile-keepsake .btn { margin-top: 12px; }
.profile-focus .profile-keepsake .link { font-size: 13px; }
.profile-focus .profile-learned-count { font: 900 44px/1 var(--ui-headline); letter-spacing: -.05em; color: var(--accent); }
.profile-focus .profile-keepsake-copy > span { font-size: 14px; }
.profile.profile-focus .secondary-stats { padding-top: 0; border-top: 0; }
.profile.profile-focus .secondary-stats .stat-l { font-size: 12px; line-height: 1.4; }
.profile-focus .profile-destinations { display: flex; flex-direction: column; border-block: 1px solid var(--hairline); }
.profile-entry { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 0; }
.profile-entry + .profile-entry { border-top: 1px solid var(--hairline); }
.profile-entry > .ico { flex: none; color: var(--ink-soft); }
.profile-entry > span { flex: 1; min-width: 0; }
.profile-entry strong, .profile-entry small { display: block; }
.profile-entry strong { font-size: 15px; }
.profile-entry small { font-size: 12px; line-height: 1.5; color: var(--ink-soft); }
.profile.profile-focus .allowance-link { margin-top: auto; border: 0; min-height: 44px; }
.profile-detail .page-head { align-items: flex-start; }
.profile-detail .page-head .utility { flex: none; }

/* Your topics: a title can run far longer than a category name. */
.profile .mastery-category { min-width: 0; overflow-wrap: anywhere; }

/* Solved puzzles: the art is the card. auto-fill keeps one or two cards at
   grid width instead of stretching them across the page. */
.recent-grid {
  display: grid; gap: 14px 12px; padding-bottom: 3px;
  grid-template-columns: repeat(auto-fill, minmax(min(148px, 100%), 1fr));
}
.recent-card { display: flex; flex-direction: column; min-width: 0; padding: 6px 6px 10px; text-decoration: none; }
.recent-card > .category-motif {
  width: 100%; height: auto; aspect-ratio: 1; margin: 0 0 8px; overflow: hidden;
  border-radius: 10px; background: #faf3e3;
}
.recent-name {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden;
  padding: 0 4px; font-size: 15px; font-weight: 700; line-height: 20px; overflow-wrap: anywhere;
}
.recent-time { min-height: 18px; padding: 0 4px; font-size: 13px; line-height: 18px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }

/* A sheet that holds a list (the summary's words) scrolls inside itself. */
.hub-sheet { max-height: calc(100dvh - 32px); overflow: hidden; gap: 16px; }
.hub-sheet .sheet-title { flex: none; }
.hub-sheet .sheet-x { min-width: 44px; min-height: 44px; margin-block: -10px; }
.hub-sheet .sheet-body { overflow-y: auto; min-height: 0; overscroll-behavior: contain; }

@media (max-height: 740px) {
  .view.profile-focus { gap: 12px; }
  .profile-focus .profile-keepsake { padding: 12px; grid-template-columns: 84px minmax(0, 1fr); gap: 12px; }
  .profile-focus .profile-keepsake > .learning-illustration { width: 84px; height: 84px; }
  .profile-entry { min-height: 60px; }
}
@media (max-width: 350px) {
  .profile-focus .profile-keepsake { grid-template-columns: 70px minmax(0, 1fr); }
  .profile-focus .profile-keepsake > .learning-illustration { width: 70px; height: 80px; }
  .profile-focus .profile-keepsake h2 { font-size: 20px; }
  .profile.profile-focus .secondary-stats .stat-v,
  .profile.profile-focus .secondary-stats .stat:last-child .stat-v { font-size: 18px; }
}
