/* Five equal dashboard destinations with a shared icon and action rhythm. */
#workspace-main .workspace-content[aria-labelledby="workspace-title-dashboard"] { max-width:1280px; margin-inline:auto; padding:32px; }
.home-action-grid {
  display:grid;
  grid-template-columns:repeat(5,minmax(0,1fr));
  gap:16px;
}
.home-action-card {
  display:flex;
  flex-direction:column;
  align-items:center;
  min-width:0;
  min-height:280px;
  box-sizing:border-box;
  padding:24px 18px 20px;
  text-align:center;
  border:1px solid var(--border);
  border-radius:var(--radius-md);
  background:var(--bg-surface);
}
.home-action-card > svg { width:48px; height:48px; flex:none; color:var(--text-muted); margin:4px 0 24px; }
.home-action-card h3 { margin:0 0 10px; font:600 17px/1.35 var(--font-display); }
.home-action-card p { margin:0 0 24px; color:var(--text-muted); font-size:13px; line-height:1.5; }
.workspace-content .home-action-card button {
  width:100%;
  min-height:40px;
  height:auto;
  padding:8px 12px;
  margin-top:auto;
  color:#fff;
  border:1px solid #2357bb;
  border-radius:6px;
  background:var(--action-face);
  box-shadow:var(--action-shadow);
  font-size:14px;
  font-weight:600;
}
.workspace-content .home-action-card button:hover:not(:disabled) { filter:brightness(1.07); }
.workspace-content .home-action-card button:active:not(:disabled) { transform:translateY(2px); box-shadow:var(--action-pressed-shadow); }
.home-recent,.home-quick { margin-top:24px; padding:24px; background:var(--bg-surface); border:1px solid var(--border-strong); border-radius:12px; }
.home-recent-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:16px; }
.home-recent-heading h3 { font:700 var(--section-heading-size) var(--font-display); margin:0; }
.workspace-content .home-recent-heading button { color:var(--text-muted); background:transparent; border:0; box-shadow:none; }
.home-recent-list { color:var(--text-muted); font-size:14px; line-height:1.6; }
.workspace-content .home-recent-game { width:100%; display:flex; align-items:center; gap:16px; padding:14px 8px; height:auto; text-align:left; color:var(--text-main); background:transparent; border:0; border-top:1px solid var(--border); box-shadow:none; border-radius:0; }
.workspace-content .home-recent-game:hover { background:var(--bg-subtle); transform:none; }
.home-recent-game > svg { width:23px; height:23px; color:var(--text-muted); flex-shrink:0; }
.home-recent-game > span { display:grid; gap:3px; min-width:0; }
.home-recent-game strong { font-size:14px; }
.home-recent-game small { color:var(--text-muted); font-size:12px; }
.home-recent-game time { display:flex; align-items:center; gap:7px; margin-left:auto; color:var(--text-muted); font-size:12px; white-space:nowrap; }
.home-recent-game time svg { width:16px; height:16px; }
.home-quick { display:block; }
.home-quick[hidden] { display:none; }

.home-linked-rows { display:grid; }
.home-linked-account { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:18px 0; }
.home-linked-account + .home-linked-account { border-top:1px solid var(--border); }
.home-linked-account:last-child { padding-bottom:4px; }
.workspace-content .home-linked-analyze { flex-shrink:0; height:44px; padding:0 20px; color:#fff; font-weight:700; font-size:14px; border:1px solid #2357bb; border-radius:8px; background:var(--action-face); box-shadow:var(--action-shadow); }
.workspace-content .home-linked-analyze:hover:not(:disabled) { filter:brightness(1.08); }
.workspace-content .home-linked-analyze:active:not(:disabled) { transform:translateY(3px); box-shadow:var(--action-pressed-shadow); }
@media(max-width:520px) { .home-linked-account { flex-wrap:wrap; gap:16px; } .workspace-content .home-linked-analyze { width:100%; } }

@media(max-width:1000px) { .home-action-grid { grid-template-columns:repeat(3,minmax(0,1fr)); } }
@media(max-width:700px) {
  #workspace-main .workspace-content[aria-labelledby="workspace-title-dashboard"] { padding:20px 16px; }
  .home-action-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
  .home-action-card { padding:20px 14px; min-height:260px; }
  .home-action-card > svg { width:40px; height:40px; margin-bottom:20px; }
  .home-recent-game { flex-wrap:wrap; }
  .home-recent-game time { margin-left:39px; }
}
@media(max-width:450px) { .home-action-grid { grid-template-columns:minmax(0,1fr); } .home-action-card { min-height:240px; } }

.home-puzzle-stats, .home-last-game { margin-top: 24px; padding: 24px; background: var(--bg-surface); border: 1px solid var(--border-strong); border-radius: 12px; }
.home-puzzle-charts { display: grid; grid-template-columns:minmax(0,1fr) minmax(0,1.3fr); gap: 28px; }
.home-puzzle-charts h4 { margin: 4px 0 20px; font-size: 14px; font-weight: 600; color: var(--text-muted); }
.home-puzzle-charts .dashboard-donut { width: 132px; height: 132px; }
.home-puzzle-charts .dashboard-donut > div { width: 96px; height: 96px; }
.home-puzzle-counts { display: grid; gap: 12px; font-size: 12px; }
.home-puzzle-counts span { display: flex; align-items: center; gap: 8px; }
.home-puzzle-counts i { width: 8px; height: 8px; border-radius: 50%; }
.home-puzzle-counts small, .home-puzzle-note { color: var(--text-muted); font-size: 11px; }
.home-puzzle-activity { display: grid; grid-template-columns: repeat(28,minmax(0,1fr)); gap: 4px; height: 120px; border-bottom: 1px solid var(--border); }
.home-puzzle-day { display: flex; align-items: end; min-width: 0; }
.home-puzzle-day > div { display: flex; flex-direction: column; justify-content: end; width: 100%; min-height: 3px; background: var(--border); border-radius: 3px 3px 0 0; overflow: hidden; }
.home-puzzle-day span { display: block; flex-shrink: 0; }
.home-puzzle-axis { display: flex; justify-content: space-between; font-size: 10px; color: var(--text-muted); margin-top: 8px; }
.home-last-game { display: flex; gap: 24px; align-items: center; }
.home-last-game[hidden] { display: none; }
.home-last-game .home-game-board { width: 140px; flex-shrink: 0; }
.home-game-board { display: block; border-radius: 5px; overflow: hidden; box-shadow: 0 0 0 1px var(--border-strong); }
.home-last-game h3 { margin: 0 0 8px; }
.home-last-game p { color: var(--text-muted); }
@media(max-width:1100px) { .home-puzzle-charts { grid-template-columns: 1fr 1fr; } }
@media(max-width:600px) { .home-puzzle-charts { grid-template-columns: 1fr; } .home-last-game { flex-direction: column; text-align: center; } .home-last-game .home-game-board { width: 180px; } }

.home-puzzle-activity .stats-day-tooltip { white-space: pre-line; }

.home-linked-empty { display:grid; justify-items:center; align-content:center; gap:10px; padding:20px 12px 32px; min-height:140px; text-align:center; }
.home-linked-empty-icon { --nav-icon:url('/icons/chess-pawn.svg'); width:36px; height:36px; color:var(--text-muted); margin-bottom:4px; }
.home-linked-empty h4 { margin:0; font-size:16px; font-weight:600; color:var(--text-main); }
.home-linked-empty p { margin:0; font-size:13px; color:var(--text-muted); line-height:1.5; }

.home-summary-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.5fr); gap:24px; margin-top:24px; align-items:stretch; }
.home-summary-row:not(:has(.home-last-game:not([hidden]))) { grid-template-columns:minmax(0,1fr); }
.home-summary-row > :is(.home-last-game,.home-puzzle-stats) { min-width:0; margin-top:0; padding:24px; }
.home-summary-row .home-last-game { gap:20px; }
.home-summary-row .home-last-game .home-game-board { width:112px; height:112px; }
.home-last-game > div { min-width:0; }
.home-last-game h3 { font-size:16px; line-height:1.5; overflow-wrap:anywhere; }
.home-last-game p { font-size:13px; }
.home-puzzle-heading { display:flex; align-items:center; flex-wrap:wrap; gap:12px; }
.home-puzzle-streak-badge { white-space:nowrap; font-size:14px; font-weight:600; }
.home-summary-row .home-puzzle-charts { gap:20px; }
.home-summary-row .dashboard-outcomes { gap:12px; padding:8px 0; }
.home-summary-row .dashboard-donut { width:96px; height:96px; }
.home-summary-row .dashboard-donut > div { width:70px; height:70px; }
.home-summary-row .dashboard-donut strong { font-size:22px; }
.home-summary-row .home-puzzle-charts h4 { margin-top:0; }
@media(max-width:1000px) { .home-summary-row { grid-template-columns:minmax(0,1fr); } }
@media(max-width:600px) { .home-summary-row > :is(.home-last-game,.home-puzzle-stats) { padding:20px; } }
