  /* ── Home hub ───────────────────────────────────────────────────────── */
  #screen-home { overflow-y: auto; }
  .home-wrap { width: 100%; max-width: 720px; margin: 0 auto; padding: 24px 20px 48px;
    display: flex; flex-direction: column; gap: 18px; }
  .home-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .home-greet { font-size: 26px; font-weight: 800; color: var(--text); letter-spacing: -0.01em; }
  #home-name { color: var(--gold); }
  .home-head-actions { display: flex; gap: 8px; flex-shrink: 0; }
  .home-iconbtn { width: 44px; height: 44px; border-radius: var(--radius); border: 1px solid var(--border);
    background: var(--card); color: var(--text); font-size: 20px; cursor: pointer; line-height: 1;
    display: flex; align-items: center; justify-content: center; transition: border-color 0.15s, background 0.15s; }
  .home-iconbtn:hover { border-color: var(--gold-dim); background: var(--surface); }
  .home-stats { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
  .home-ratings { display: flex; gap: 10px; flex-wrap: wrap; }
  .home-rating-pill { display: flex; flex-direction: column; gap: 2px; padding: 10px 16px;
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); min-width: 90px; }
  .home-rating-pill .hr-lbl { font-size: 10px; font-weight: 700; letter-spacing: 0.12em;
    text-transform: uppercase; color: var(--muted); }
  .home-rating-pill .hr-val { font-size: 22px; font-weight: 800; color: var(--text);
    font-variant-numeric: tabular-nums; line-height: 1.1; }
  .home-streak { display: flex; align-items: center; gap: 6px; padding: 10px 14px;
    background: var(--gold-bg); border: 1px solid var(--gold-dim); border-radius: var(--radius);
    color: var(--gold); font-weight: 800; font-size: 18px; }
  .home-streak .hs-lbl { font-size: 11px; font-weight: 600; letter-spacing: 0.06em;
    text-transform: uppercase; color: var(--gold); opacity: 0.85; }
  .home-hero { display: flex; align-items: center; gap: 20px; padding: 22px 24px;
    background: var(--bs-sheet);
    border: 2px solid var(--bs-ink); border-radius: var(--radius); }
  .home-hero-body { flex: 1; min-width: 0; }
  .home-hero-kicker { font-size: 11px; font-weight: 800; letter-spacing: 0.16em;
    text-transform: uppercase; color: var(--gold); }
  .home-hero-title { font-size: 20px; font-weight: 800; color: var(--text); margin: 5px 0 4px;
    line-height: 1.25; }
  .home-hero-meta { font-size: 13px; color: var(--muted); }
  .home-hero-btn { flex-shrink: 0; white-space: nowrap; width: auto; }
  .home-rounds { margin-top: 4px; }
  .home-rounds-head { font-size: 11px; font-weight: 800; letter-spacing: 0.16em;
    text-transform: uppercase; color: var(--gold); margin-bottom: 10px; }
  .home-rounds-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
  @media (max-width: 560px) { .home-rounds-grid { grid-template-columns: 1fr; } }
  .round-card { display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
    padding: 16px 18px; background: var(--card); border: 1px solid var(--border);
    border-left: 3px solid var(--gold-dim); border-radius: var(--radius); cursor: pointer;
    text-align: left; font: inherit; color: var(--text); touch-action: manipulation;
    transition: border-color 0.15s ease, transform 0.15s ease; }
  .round-card:hover { border-color: var(--gold); border-left-color: var(--gold);
    transform: translateY(-1px); }
  .round-card .rc-icon { font-size: 22px; }
  .round-card .rc-name { font-size: 15px; font-weight: 700; }
  .round-card .rc-meta { font-size: 11.5px; color: var(--muted); }
  @media (max-width: 560px) { .home-hero { flex-direction: column; align-items: stretch; gap: 14px; }
    .home-hero-btn { width: 100%; } }
  /* Coach-assigned work — student home */
  .home-assignments { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
  .home-assign-card { display: flex; align-items: center; gap: 16px; padding: 16px 18px;
    background: var(--card); border: 1px solid var(--teal-dim); border-radius: var(--radius); }
  .home-assign-body { flex: 1; min-width: 0; }
  .home-assign-card .btn-primary { width: auto; flex-shrink: 0; white-space: nowrap; }
  .home-assign-kicker { font-size: 10px; font-weight: 800; letter-spacing: 0.14em;
    text-transform: uppercase; color: var(--teal); display: flex; align-items: center; gap: 8px; }
  .home-assign-new { font-size: 9px; font-weight: 800; letter-spacing: 0.08em; padding: 2px 6px;
    border-radius: 999px; background: var(--teal); color: var(--bs-sheet); }
  .home-assign-title { font-size: 16px; font-weight: 700; color: var(--text); margin: 4px 0; }
  .home-assign-meta { font-size: 12px; color: var(--muted); }
  .home-assign-bar { height: 6px; border-radius: var(--radius); background: var(--surface); overflow: hidden; margin-top: 8px; }
  .home-assign-bar-fill { height: 100%; background: var(--teal); border-radius: var(--radius); }
  .home-assign-done { color: var(--green); font-weight: 700; }
  @media (max-width: 560px) { .home-assign-card { flex-direction: column; align-items: stretch; gap: 12px; }
    .home-assign-card .btn-primary { width: 100%; } }
  /* Coach assign-work form */
  .assign-form { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; max-width: 720px; }
  .assign-row { display: flex; gap: 14px; flex-wrap: wrap; }
  .assign-label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600;
    color: var(--muted); flex: 1; min-width: 130px; }
  .assign-skills { display: flex; flex-wrap: wrap; gap: 8px; }
  .assign-skill { font-size: 13px; padding: 6px 12px; border-radius: 999px; cursor: pointer;
    border: 1px solid var(--subtle); background: var(--surface); color: var(--text); user-select: none; }
  .assign-skill.on { border-color: var(--gold); color: var(--gold); background: var(--gold-bg); }
  .assign-actions { display: flex; align-items: center; gap: 12px; }
  .assign-list { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; max-width: 720px; }
  .assign-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
  .assign-item-body { flex: 1; min-width: 0; }
  .assign-item-title { font-size: 14px; font-weight: 600; color: var(--text); }
  .assign-item-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
  .assign-item.archived { opacity: 0.5; }
  .assign-archive { font-size: 12px; color: var(--muted); cursor: pointer; background: none;
    border: 1px solid var(--subtle); border-radius: var(--radius); padding: 5px 10px; }
  .assign-archive:hover { color: var(--red); border-color: var(--red); }
  .home-card-subtitle { font-size: 12px; color: var(--muted); margin: -4px 0 14px; line-height: 1.5; }
  .home-nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin: 18px 0 8px; }
  .home-nav-card { display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer;
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; color: var(--text); }
  .home-nav-card:hover { border-color: var(--gold-dim); background: var(--surface); }
  .home-nav-card .hn-icon { font-size: 22px; flex-shrink: 0; }
  .home-nav-card .hn-text { display: flex; flex-direction: column; gap: 2px; }
  .home-nav-card .hn-title { font-size: 15px; font-weight: 800; }
  .home-nav-card .hn-sub { font-size: 12px; color: var(--muted); }
  .home-settings-sheet { display: flex; gap: 18px; padding: 12px 16px; background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius); }
  .home-sheet-link { font-size: 13px; color: var(--muted); text-decoration: none;
    border-bottom: 1px solid transparent; }
  .home-sheet-link:hover { color: var(--gold); border-bottom-color: var(--gold-dim); }
  .home-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 20px; display: flex; flex-direction: column; gap: 16px; }
  .home-card-title { font-size: 12px; font-weight: 800; letter-spacing: 0.14em;
    text-transform: uppercase; color: var(--gold); }
  .home-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .home-train-controls { display: flex; flex-wrap: wrap; gap: 16px; }
  .home-ctrl { display: flex; flex-direction: column; gap: 8px; }
  .home-focus-sel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 8px 12px; color: var(--text); font-family: inherit; font-size: 13px; min-height: 38px; }
  .home-start-btn { margin-top: 4px; }
  .home-lb-view { font-size: 12px; font-weight: 700; color: var(--gold); text-decoration: none;
    white-space: nowrap; }
  .home-lb-view:hover { text-decoration: underline; }
  .home-lb-list { display: flex; flex-direction: column; gap: 6px; }
  .home-lb-row { display: flex; align-items: center; gap: 12px; padding: 10px 14px;
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
  .home-lb-row.you { border-color: var(--gold-dim); background: var(--gold-bg); }
  .home-lb-rank { font-size: 13px; font-weight: 800; color: var(--muted); min-width: 26px;
    font-variant-numeric: tabular-nums; }
  .home-lb-row.you .home-lb-rank { color: var(--gold); }
  .home-lb-handle { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; color: var(--text);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .home-lb-score { font-size: 14px; font-weight: 800; color: var(--text);
    font-variant-numeric: tabular-nums; }
  .home-lb-divider { font-size: 11px; color: var(--muted); text-align: center; padding: 2px 0; letter-spacing: 0.2em; }
  .home-lb-empty { font-size: 13px; color: var(--muted); padding: 10px 4px; }

  /* ── Leaderboard screen ─────────────────────────────────────────────── */
  .lb-body { flex: 1; width: 100%; max-width: 640px; margin: 0 auto; padding: 20px 16px 40px;
    display: flex; flex-direction: column; gap: 18px; overflow-y: auto; }
  .lb-join { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 22px 20px; display: flex; flex-direction: column; gap: 12px; }
  .lb-join-title { font-size: 16px; font-weight: 800; color: var(--gold); }
  .lb-join-copy { font-size: 13px; line-height: 1.5; color: var(--muted); margin: 0; }
  .lb-join-form { display: flex; gap: 10px; flex-wrap: wrap; }
  .lb-handle-input { flex: 1; min-width: 140px; background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px;
    color: var(--text); font-family: inherit; font-size: 15px; min-height: 44px; }
  .lb-handle-input:focus { outline: none; border-color: var(--gold-dim); }
  .lb-claim-btn { min-height: 44px; white-space: nowrap; width: auto; }
  .lb-join-msg { font-size: 13px; line-height: 1.45; padding: 10px 12px; border-radius: var(--radius);
    background: var(--gold-bg); border: 1px solid var(--gold-dim); color: var(--gold); }
  .lb-select-wrap { width: 100%; }
  .lb-board-select { width: 100%; background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 12px 14px; color: var(--text); font-family: inherit;
    font-size: 15px; font-weight: 600; min-height: 46px; }
  .lb-board-select:focus { outline: none; border-color: var(--gold-dim); }
  .lb-caption { font-size: 12px; color: var(--muted); line-height: 1.4; padding: 0 2px; }
  .lb-list { display: flex; flex-direction: column; gap: 7px; }
  .lb-row { display: flex; align-items: center; gap: 12px; padding: 13px 16px;
    background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); }
  .lb-row.you { border-color: var(--gold-dim); background: var(--gold-bg); }
  .lb-rank { font-size: 14px; font-weight: 800; color: var(--muted); min-width: 34px;
    font-variant-numeric: tabular-nums; }
  .lb-row.you .lb-rank { color: var(--gold); }
  .lb-handle { flex: 1; min-width: 0; font-size: 15px; font-weight: 600; color: var(--text);
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .lb-row.you .lb-handle { color: var(--gold); }
  .lb-score { font-size: 15px; font-weight: 800; color: var(--text);
    font-variant-numeric: tabular-nums; }
  .lb-empty { font-size: 14px; color: var(--muted); padding: 24px 8px; text-align: center; }
  .lb-yourrank { font-size: 13px; font-weight: 700; color: var(--gold);
    padding: 12px 16px; background: var(--gold-bg); border: 1px solid var(--gold-dim);
    border-radius: var(--radius); text-align: center; }
  .lb-leave { align-self: center; margin-top: 6px; background: none; border: none;
    color: var(--muted); font-family: inherit; font-size: 12px; cursor: pointer;
    text-decoration: underline; padding: 8px; min-height: 44px; }
  .lb-leave:hover { color: var(--gold); }
  @media (max-width: 430px) {
    .lb-body { padding: 16px 12px 32px; }
    .lb-join { padding: 18px 16px; }
    .lb-claim-btn { flex: 1; }
    .lb-row { padding: 12px 14px; }
    .lb-handle { font-size: 14px; }
  }

