/* Path, Progress, Library (v2 build item 6). Prefixes .pa-,
   .pg-, .lb-. */
.pa-list{display:grid;gap:12px}
.pa-row{display:flex;align-items:center;gap:16px;height:76px;padding:0 24px;border-radius:18px}
.pa-badge{display:grid;place-items:center;width:40px;height:40px;border-radius:50%;
  background:var(--lav-1);color:var(--violet-deep);font-weight:800;flex:none;font-size:1rem}
.pa-badge .lucide{width:20px;height:20px}
.pa-done .pa-badge{background:#e2f3e8;color:#1e7a46}
.pa-locked{background:var(--paper)}
.pa-locked .pa-badge{background:var(--lav-1);color:var(--muted)}
.pa-locked .pa-titles b{color:var(--muted);font-weight:700}
.pa-titles{flex:1;min-width:0}
.pa-titles b{font-size:1.03125rem;font-weight:800}
.pa-line{margin:2px 0 0!important;font-size:.8125rem}
.pa-contents{color:#1e7a46;font-size:.8125rem;font-weight:600;white-space:nowrap}
.pa-started .pa-contents{color:var(--muted)}
.pa-known .pa-contents{color:var(--violet-deep)}
.pa-slim-line.pa-known-line{color:var(--violet-deep);font-weight:700}
.pa-current{display:block;height:auto;padding:24px 32px 20px;border:1.5px solid var(--violet);border-radius:22px}
.pa-cur-head{display:flex;align-items:flex-start;gap:24px;margin-bottom:20px}
.pa-cur-title{font-size:1.1875rem!important}
.pa-prog{margin-left:auto;text-align:right;flex:none}
.pa-prog-bar{width:288px;height:10px}
.pa-prog-n{display:block;color:var(--muted);font-size:.75rem;font-weight:600;margin-top:8px}
.pa-stream{display:flex;align-items:center;gap:16px;height:48px;padding:0 16px;margin:0 0 8px;
  border-radius:12px;background:var(--paper);border:1px solid var(--lav-2);
  text-decoration:none;color:var(--ink)}
.pa-stream-cur{background:var(--lav-1);border-color:transparent}
.pa-glyph{display:grid;place-items:center;width:28px;height:28px;border-radius:50%;flex:none;
  font-size:.75rem;font-weight:800;background:var(--lav-2);color:var(--muted)}
.pa-glyph .lucide{width:14px;height:14px}
.pa-glyph-done{background:#2f9e5f;color:#fff}
.pa-glyph-cur{background:var(--violet);color:#fff}
.pa-stream-label{font-size:.9375rem;font-weight:700}
.pa-stream-cur .pa-stream-label{font-weight:800}
.pa-stream-status{margin-left:auto;font-size:.75rem;font-weight:600;color:var(--muted);white-space:nowrap}
.pa-stream-status-cur{color:var(--violet)}
.pa-band{margin-top:20px}
/* Flush only when the band is genuinely the first content under
   the date line. The old :first-of-type rule also matched when
   the Chapter 0 strip (an <a>, not a <section>) rendered above
   the first band, zeroing its margin so the two strips touched
   (F10, 2026-12-02). */
.date-line + .pa-band{margin-top:0}
.pa-band-claimed .pa-badge,.pa-band-done .pa-badge{background:#e2f3e8;color:#1e7a46}
.pa-band-locked{background:var(--paper)}
.pa-band-locked .pa-badge{background:var(--lav-1);color:var(--muted)}
.pa-band-locked .pa-titles b{color:var(--muted);font-weight:700}
.pa-band-current .pa-badge{background:var(--violet);color:#fff;font-size:.8125rem}
.pa-group-list{margin-top:12px}
/* Road focus (2026-12-01): every band but the one being
   studied closes into a true one-line strip, 52px tall, and
   the open band's rows slim down to the same height. */
.pa-strip{display:flex;align-items:center;gap:12px;height:52px;padding:0 16px;margin-top:12px;
  border-radius:18px;text-decoration:none;color:var(--ink);cursor:pointer}
.pa-list .pa-strip{margin-top:0}
.pa-strip .pa-badge{width:32px;height:32px}
.pa-strip .pa-badge .lucide{width:14px;height:14px}
.pa-strip .pa-badge .ic-check{width:16px;height:16px}
.pa-strip .pa-titles{display:flex;align-items:baseline;gap:10px}
.pa-strip .pa-titles b{font-size:.9375rem;white-space:nowrap}
.pa-strip-line{color:var(--muted);font-size:.8125rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pa-chev{color:var(--muted);flex:none;display:grid;place-items:center;margin-left:auto}
.pa-chev .lucide{width:18px;height:18px}
.pa-strip-open .pa-chev .lucide{transform:rotate(180deg)}
.pa-chev-up .lucide{transform:rotate(180deg)}
.pa-door{color:var(--violet);font-weight:700;font-size:.8125rem;white-space:nowrap;
  display:flex;align-items:center;gap:2px;margin-left:auto}
.pa-door .lucide{width:16px;height:16px}
.pa-chapter-strip .pa-badge{background:var(--lav-1);color:var(--violet-deep)}
.pa-band-head{display:block;height:auto;padding:20px 24px;border-radius:24px}
.pa-band-top{display:flex;align-items:center;gap:16px}
.pa-band-bar{margin-top:14px}
.pa-slim{height:52px;padding:0 16px;gap:12px}
.pa-slim .pa-badge{width:32px;height:32px;font-size:.8125rem}
.pa-slim .pa-badge .lucide{width:14px;height:14px}
.pa-slim .pa-badge .ic-check{width:16px;height:16px}
.pa-slim .pa-titles{display:flex;align-items:baseline;gap:10px}
.pa-slim .pa-titles b{font-size:.9375rem;white-space:nowrap}
.pa-slim-line{color:var(--muted);font-size:.8125rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* An opened lesson's expansion (2026-12-01): its stream
   rows sit in the list's own rhythm under the row, without
   the current card's per-row bottom margin. */
.pa-openable{cursor:pointer}
.pa-open-list{display:grid;gap:8px}
.pa-open-list .pa-stream{margin:0}
.pa-showall{display:flex;align-items:center;justify-content:center;gap:6px;height:48px;padding:0 16px;
  border-radius:18px;color:var(--violet);font-weight:800;font-size:.875rem;cursor:pointer}
.pa-showall .pa-chev{margin-left:0}
.pa-showall .pa-chev .lucide{width:16px;height:16px}
/* Flow Q9: locked rows take a tap and explain the lock — the
   note sits under the row in the list's own rhythm, and a tap
   on the note itself closes it. A band head is a direct child
   of the view (no list gap around it), so its note carries
   its own top margin. */
.pa-locked,.pa-band-locked{cursor:pointer}
.pa-lock-note{margin:0;padding:12px 24px;border-radius:14px;background:var(--lav-1);
  color:var(--violet-deep);font-size:.875rem;font-weight:600;line-height:1.5;cursor:pointer}
.pa-band + .pa-lock-note{margin-top:12px}

/* The four tiles share the row's width and shrink to fit it
   (San's call, 2026-11-24): the fixed 262px columns needed
   1120px, but beside the 240px sidebar a 1280px window leaves
   a 960px content column, so the fourth tile ran to
   right=1400px — 120px past the screen edge (UI audit pass 2).
   The content column never exceeds 1120px (.main caps at
   1200px less its 40px padding), so at 1440px and wider the
   tiles still come out at their full 262px. */
.pg-tiles{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:24px;margin-bottom:24px}
@media (max-width:1240px){ .pg-tiles{grid-template-columns:repeat(2,1fr)} }
.pg-tile{text-align:left;border-radius:20px;padding:20px 24px;height:110px}
.pg-tile-n{display:block;font-size:2rem;font-weight:800;color:var(--violet);line-height:1.2}
.pg-tile-label{color:var(--muted);font-size:.875rem}
.pg-row{display:flex;gap:24px;margin-bottom:24px}
.pg-due{flex:0 0 700px;min-width:0}
.pg-stages{flex:1;min-width:0}
@media (max-width:1240px){ .pg-row{flex-direction:column} .pg-due{flex:none} }
.pg-bars{display:flex;gap:0;align-items:flex-end;height:148px;padding-left:18px}
.pg-col{flex:0 0 90px;display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-end;height:100%}
.pg-bar-n{font-size:.8125rem;font-weight:800;margin-bottom:6px;width:48px;text-align:center}
.pg-bar{display:block;width:48px;border-radius:7px;background:var(--lav)}
.pg-bar-today{background:var(--lime)}
.pg-bar-d{font-size:.6875rem;color:var(--muted);margin-top:8px;width:48px;text-align:center}
.pg-bar-d-today{font-weight:800;color:var(--ink)}
.pg-stack{display:flex;gap:3px;margin:6px 0 14px}
.pg-seg{display:block;height:30px;border-radius:6px;min-width:8px}
.pg-stage-row{display:flex;align-items:center;height:34px}
.pg-stage-name{font-size:.875rem;font-weight:600}
.pg-stage-n{margin-left:auto;font-size:.875rem;font-weight:800}
.pg-acc-row{display:flex;align-items:center;gap:18px;height:42px}
.pg-acc-label{flex:0 0 130px;font-size:.875rem;font-weight:700}
.pg-acc-track{flex:0 0 700px;height:16px;border-radius:8px;background:var(--lav-2);overflow:hidden}
@media (max-width:1240px){ .pg-acc-track{flex:1} }
.pg-acc-fill{display:block;height:100%;background:var(--violet);border-radius:8px}
.pg-acc-pct{font-size:.875rem;font-weight:800}

.lb-search-wrap{position:relative;margin:6px 0 20px}
.lb-search-icon{position:absolute;left:20px;top:50%;transform:translateY(-50%);width:20px;height:20px;color:var(--muted);pointer-events:none}
.lb-search{width:100%;font:inherit;font-size:1rem;height:64px;padding:0 20px 0 54px;
  border:1.5px solid var(--violet);border-radius:16px;background:var(--white)}
.lb-search:focus{outline:2px solid var(--violet);outline-offset:1px}
.lb-chips{margin-bottom:16px}
/* Library chips, organize chips and pagination controls stand
   44px tall (UI audit tap-target batch); equal negative margins
   hand the growth back so the rows do not move. */
.lb-chip{font:inherit;font-size:.875rem;font-weight:700;border-radius:19px;height:44px;
  padding:0 16px;margin:-2px 0;display:inline-flex;align-items:center;
  border:1px solid var(--lav-2);background:var(--white);color:var(--muted);cursor:pointer}
.lb-chip-on{background:var(--violet);border-color:var(--violet);color:var(--white)}
.lb-count{color:var(--muted);font-weight:700;margin:0 0 10px}
.lb-row{display:grid;grid-template-columns:96px 1fr auto auto;align-items:center;gap:24px;
  width:100%;height:72px;text-align:left;font:inherit;
  background:var(--white);border:1px solid var(--lav-2);border-radius:16px;
  padding:0 23px;margin-bottom:12px;cursor:pointer}
.lb-row:hover{border-color:var(--violet)}
.lb-row .rv-chip{width:96px;height:28px;border-radius:14px;font-size:.75rem;font-weight:700;
  display:inline-flex;align-items:center;justify-content:center;padding:0;flex:none}
.lb-row .rv-chip-words{background:#f1ebfa}
.lb-main{display:grid;grid-template-columns:300px 170px minmax(0,1fr);gap:0;align-items:center;min-width:0}
.lb-row-grammar .lb-main{grid-template-columns:380px minmax(0,1fr);gap:20px}
.lb-glyph{font-family:var(--jp);font-size:1.1875rem;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.lb-row-grammar .lb-glyph{font-size:1.125rem}
.lb-reading{color:var(--muted);font-family:var(--jp);font-size:.8125rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.lb-gloss{color:var(--ink);font-size:.875rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.lb-org-short{display:none}
/* Mobile rows follow the Library mobile board: glyph with its
   reading · gloss line under it on the left; the kind chip top-right
   with the stage centred under it. The lesson tag is a web-board
   column and stays off the phone layout. */
@media (max-width:899px){
  .lb-row{grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"main chip" "main status";
    height:auto;min-height:80px;padding:12px 16px;gap:2px 12px;align-items:start}
  .lb-main{grid-area:main;display:block;min-width:0}
  .lb-glyph{display:block;font-size:1.0625rem;white-space:normal}
  .lb-reading,.lb-gloss{display:inline;white-space:normal}
  .lb-reading::after{content:" · "}
  .lb-reading-none{display:none}
  .lb-row .rv-chip{grid-area:chip;justify-self:end;width:98px}
  .lb-status{grid-area:status;justify-self:end;width:98px;text-align:center;margin-top:6px;font-size:.65625rem;align-self:start}
  .lb-tag{display:none}
}
.lb-status{font-size:.75rem;font-weight:800;letter-spacing:.06em;color:var(--muted);white-space:nowrap}
.lb-studied{display:block;font-size:.625rem;font-weight:700;letter-spacing:.06em;color:var(--muted)}
.lb-status.st-known{color:#1e7a46}
.lb-status.st-new{color:var(--violet-deep)}
.lb-tag{font-size:.75rem;font-weight:800;letter-spacing:.06em;color:var(--violet-deep);white-space:nowrap}
.lb-org{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:26px}
.lb-org-label{font-size:.8125rem;font-weight:700;color:var(--muted);margin-right:2px}
.lb-org-chip{font:inherit;font-size:.8125rem;font-weight:700;border-radius:12px;height:44px;padding:0 14px;
  margin:-2px 0;display:inline-flex;align-items:center;
  border:1px solid var(--lav-2);background:var(--white);color:var(--muted);cursor:pointer}
.lb-org-on{background:var(--lav-1);border-color:var(--lav-1);color:var(--violet-deep)}
.lb-org-note{margin-left:auto;font-size:.8125rem;font-weight:600;color:var(--muted)}
.lb-section{display:flex;align-items:center;gap:16px;width:100%;height:54px;text-align:left;font:inherit;
  border:0;border-radius:14px;padding:0 18px;margin-bottom:10px}
.lb-collapsed .lb-section-name{color:var(--ink);font-size:1.0625rem}
.lb-collapsed .lb-section-line{color:var(--muted);font-weight:400;font-size:.875rem}
.lb-open{background:var(--lav-1)}
.lb-section-grammar{background:#faf3e0}
.lb-section-grammar .lb-section-name{color:#b98a1d}
.lb-collapsed{background:var(--white);border:1px solid var(--lav-2);cursor:pointer}
.lb-collapsed:hover{border-color:var(--violet)}
.lb-section-name{font-size:1.25rem;font-weight:800;color:var(--violet-deep)}
.lb-section-line{font-size:.875rem;font-weight:600}
.lb-section-state{margin-left:auto;font-size:.8125rem;font-weight:600;color:var(--muted);white-space:nowrap}
.lb-collapsed .lb-section-state{color:var(--violet);font-weight:700}
/* The band's chevron is the "this opens" cue: it matches the
   state text's colour in each band state and flips up while
   the section is open. */
.lb-section-chev{width:20px;height:20px;flex:none;color:var(--violet);transition:transform .2s}
.lb-open .lb-section-chev{color:var(--muted);transform:rotate(180deg)}
.lb-pages{display:flex;align-items:center;gap:14px;flex-wrap:wrap;background:var(--white);
  border:1px solid var(--lav-2);border-radius:14px;height:56px;padding:0 16px;margin:4px 0 12px}
.lb-pages-label{font-size:.8125rem;font-weight:600;color:var(--muted)}
.lb-page-btns{margin-left:auto;display:flex;gap:6px;align-items:center}
.lb-page-btn{font:inherit;font-size:.8125rem;font-weight:700;border-radius:10px;height:44px;min-width:44px;padding:0 11px;
  margin:-2px 0;display:inline-flex;align-items:center;
  border:1px solid var(--lav-2);background:var(--white);color:var(--muted);cursor:pointer}
.lb-page-btn.on{background:var(--violet);border-color:var(--violet);color:var(--white)}
.lb-page-btn:disabled{opacity:.45;cursor:default}
.lb-page-gap{color:var(--muted)}
.lb-page-go{display:inline-flex;gap:6px;align-items:center;margin-left:4px}
.lb-page-go-input{font:inherit;font-size:.8125rem;font-weight:600;width:62px;height:44px;padding:0 8px;margin:-2px 0;
  border-radius:10px;border:1px solid var(--lav-2);background:var(--white);color:var(--ink)}
.lb-foot{text-align:center;color:var(--muted);font-size:.875rem;margin:18px auto 0;max-width:760px;line-height:1.5}
.pa-practice{margin-left:10px}
@media (max-width:640px){
  /* Section bands stack on a phone: name + state on the first
     line, the counts line full-width under them. The fixed
     54px one-line band fit the desktop board; at 390px the
     line wrapped inside it and spilled over the border. */
  .lb-section{height:auto;min-height:54px;padding:10px 14px;flex-wrap:wrap;row-gap:2px}
  .lb-section-name{order:1}
  .lb-section-state{order:2}
  .lb-section-chev{order:2}
  .lb-section-line{order:3;flex:1 1 100%}
  .lb-pages{height:auto;padding:10px 14px}
  /* Filter chips: the mobile board draws plain labels in one row —
     the counts stay on wider screens. One tidy scrollable row. */
  .lb-chips{display:flex;flex-wrap:nowrap;overflow-x:auto;padding-bottom:4px}
  .lb-chip{flex:none}
  .lb-chip-n{display:none}
  /* Organize row: short labels (the board's Course / Kana / Recent),
     one row, and no per-page note — the board's phone layout has
     none; the pagination bar below carries the position. */
  /* Wraps instead of running off the edge when the row's own
     width shrinks below the chips' fit — at the largest text
     sizes the zoom halves the effective width inside this same
     phone layout (2026-12-02). At ordinary phone widths the
     short labels fit on one line and nothing wraps. */
  .lb-org{flex-wrap:wrap;gap:6px}
  .lb-org-chip{flex:1 1 auto;padding:0 6px;font-size:.75rem;white-space:nowrap;justify-content:center}
  .lb-org-full{display:none}
  .lb-org-short{display:inline}
  .lb-org-note{display:none}
  /* The forecast's seven day columns share the card's width
     instead of running off its right edge at 90px each. */
  .pg-bars{padding-left:0}
  .pg-col{flex:1 1 0;min-width:0;align-items:center}
  .pg-bar,.pg-bar-n,.pg-bar-d{width:100%;max-width:48px}
}
@media (max-width:900px){
  .pa-row{height:auto;min-height:76px;padding:12px 16px}
  .pa-row.pa-slim{height:52px;min-height:52px;padding:0 16px}
  .pa-band-head{padding:20px 16px}
  .pa-lock-note{padding:12px 16px}
  .pa-contents{white-space:normal;text-align:right}
  .pa-current{padding:20px 16px}
  .pa-cur-head{flex-wrap:wrap}
  .pa-prog{flex:1 1 100%;margin-left:0;text-align:left}
  .pa-prog-bar{width:100%}
  .pa-prog-n{text-align:left}
  .pa-stream{height:auto;min-height:48px;padding:8px 12px;flex-wrap:wrap}
}

/* Phone pagination is the board's single bar: Prev, page label, Next. */
@media (max-width:640px){
  .lb-page-num,.lb-page-gap{display:none}
  /* Road focus strips stack their name over their line on a
     phone, as the approved mock draws them. */
  .pa-strip{height:56px}
  .pa-strip .pa-titles{display:block}
  .pa-strip .pa-titles b{display:block}
  .pa-strip-line{display:block}
  /* Slim lesson rows stack the same way on a phone: name
     over the progress line. On one baseline the line was
     ellipsised against the contents line ("32 of ..." —
     San's report, 2026-12-01); stacked, the full count
     fits and the contents line wraps beside it. */
  .pa-row.pa-slim{height:auto;min-height:52px;padding-top:10px;padding-bottom:10px}
  .pa-slim .pa-titles{display:block}
  .pa-slim .pa-titles b{display:block}
  .pa-slim-line{display:block;white-space:normal;overflow:visible;text-overflow:clip}
  /* A Known row's titles keep the name's own width on a
     phone: flex would squeeze the box under the name's
     width and the name painted over the contents line
     (two-digit lessons in the claimed bands). The contents
     line wraps inside what is left instead. */
  .pa-known .pa-titles{flex:none}
}
