/* assets/css/practice.css — the Practice tab in Orbit (Phase 241, board "The sun first"; views/practice.php,
   assets/js/practice-render.js). The night panel that IS today's reviews, the ways to practise and the collection.
   It reuses the shared Orbit material (public.css `.orbit-night`, `.orbit-btn`, `.orbit-card`, `.orbit-row`,
   `.orbit-tile`, `.orbit-chip`, `.orbit-link`) and adds only what the board draws that it lacks: the sun beside the
   h1, the week, the mode grid, the chips that filter, the field and the stage dots.
   ⚠️ THE PANEL SITS INSIDE THE MAIN COLUMN, not above the grid as Learn's does, so this page's grid is its own
   (`.pr-grid`), with the board's numbers: 1240 with 32px sides, a 340px right column, 32px between. */

/* The page ground (the glow, the voyage art) is Learn's one rule for all four tabs (learn.css). */
#app-root>.lpage-grid.pr-grid{box-sizing:border-box;max-width:1240px;margin:2px auto 0;padding:0 32px;grid-template-columns:minmax(0,1fr) 340px;gap:32px;justify-content:stretch;}
.pr-grid>.practice-page{display:flex;flex-direction:column;gap:28px;padding:0 0 96px;}
.pr-grid>.lpage-side{padding:0 0 40px;}
.practice-hub:empty{display:none;}

/* ── The night panel ─────────────────────────────────────────────────────────────────────────────────────────────
   ⚠️ IT WRAPS RATHER THAN SQUEEZES. The board's 300px week sits beside a 380px lead at 1280; from ~1200 down (the
   right column still beside it) that lead would be ~165px and the h1 a column of single words. Flex-wrap with the
   lead's 999 grow keeps the board's two halves while they fit and drops the week under the lead, full width, the
   moment they do not — the phone's one column falls out of the same rule. The stars are background layers, so a
   screen reader never meets them and `.orbit-night`'s children rule cannot reposition them. */
.pr-today.orbit-night{display:flex;flex-wrap:wrap;align-items:center;gap:24px 40px;padding:38px 42px;background:radial-gradient(1.5px 1.5px at 12% 22%,rgba(255,255,255,0.7),transparent),radial-gradient(1px 1px at 32% 78%,rgba(255,255,255,0.5),transparent),radial-gradient(1.5px 1.5px at 58% 14%,rgba(255,255,255,0.6),transparent),radial-gradient(1px 1px at 74% 64%,rgba(255,255,255,0.5),transparent),radial-gradient(1px 1px at 90% 30%,rgba(255,255,255,0.6),transparent),radial-gradient(1.5px 1.5px at 46% 52%,rgba(255,255,255,0.35),transparent),linear-gradient(135deg,var(--orbit-night) 0%,var(--text-color) 55%,var(--orbit-night-high) 100%);}
/* The panel's placeholder and every real shape of it ("Start your collection", "All caught up", words due with the
   week) share ONE floor: the tallest, words due with the week, measured at 1536 and 390. The panel sits above the
   hub, so a panel that changed height on landing would move everything under it. */
.pr-today{--pr-today-h:368px;min-height:var(--pr-today-h);}
.pr-today-main{flex:999 1 340px;min-width:0;}
.pr-today-lead{display:flex;align-items:center;gap:30px;margin-top:20px;}
.pr-today-words{min-width:0;}
.pr-sun{flex:none;display:grid;place-items:center;width:104px;height:104px;border-radius:50%;background:radial-gradient(circle at 38% 34%,#FFE3C8 0%,var(--orbit-stage-5) 52%,var(--secondary) 100%);box-shadow:0 0 0 14px rgba(255,154,110,0.12),0 0 0 32px rgba(255,154,110,0.06),0 0 60px 10px rgba(255,154,110,0.35);color:var(--text-color);font-size:38px;}
.pr-sun-n{font-family:var(--font-display),sans-serif;font-size:44px;font-weight:800;line-height:1;}
.pr-sun-n--long{font-size:30px;}
.pr-today-title{margin:0;font-family:var(--font-display),sans-serif;font-size:38px;font-weight:700;line-height:1.05;letter-spacing:-.01em;color:#FFFFFF;overflow-wrap:anywhere;}
.pr-today-sub{margin:8px 0 0;color:var(--orbit-night-sub);font-size:17px;font-weight:700;}
.pr-today-acts{display:flex;align-items:center;gap:18px;margin-top:28px;}
.pr-today .pr-today-acts .orbit-btn{margin-top:0;border:0;font-family:inherit;white-space:nowrap;cursor:pointer;}
.pr-today :is(a,button):focus-visible{outline:2px solid var(--orbit-night-eyebrow);outline-offset:3px;}

/* The week: seven bars from today, today's in the sun's colour, a 0 day an empty track. */
.pr-fc{flex:1 1 300px;min-width:0;box-sizing:border-box;padding:22px 22px 18px;border:1px solid rgba(255,255,255,0.12);border-radius:22px;background:rgba(255,255,255,0.06);}
.pr-fc-label{color:var(--orbit-night-sub);font-size:13px;font-weight:800;letter-spacing:.12em;text-transform:uppercase;}
.pr-week{display:grid;grid-template-columns:repeat(7,1fr);gap:8px;align-items:end;height:66px;margin-top:16px;}
.pr-week>i{display:block;min-height:6px;border-radius:6px 6px 3px 3px;background:rgba(183,173,255,0.4);}
.pr-week>i.is-now{background:var(--orbit-stage-5);}
.pr-week>i.is-empty{background:rgba(255,255,255,0.12);}
.pr-days{display:grid;grid-template-columns:repeat(7,1fr);gap:8px;margin-top:6px;color:var(--orbit-night-sub);font-size:12px;font-weight:800;text-align:center;}
.pr-fc-line{margin:12px 0 0;color:var(--orbit-night-sub);font-size:14px;font-weight:700;}

/* Its placeholders, in the places the real parts take (Phase 177b), on the night ground as Learn's are. */
.pr-today .skeleton-bar{background:rgba(255,255,255,0.10);}
.pr-today .skeleton-bar::after{background:linear-gradient(90deg,transparent,rgba(255,255,255,0.16),transparent);}
.pr-sk{display:block;}
.pr-sk-sun{flex:none;width:104px;height:104px;border-radius:50%;}
.pr-sk-lines{display:flex;flex-direction:column;gap:12px;width:min(320px,100%);}
.pr-sk-title{height:38px;border-radius:12px;}
.pr-sk-sub{width:80%;}
.pr-sk-btn{width:200px;height:54px;margin-top:28px;border-radius:14px;}
.pr-week>.skeleton-bar{border-radius:6px 6px 3px 3px;}
.pr-sk-line{margin-top:30px;}

/* ── More ways to practise, and the collection ──────────────────────────────────────────────────────────────── */
/* The hub under the panel, and its placeholders, keep the page's own gap between sections. */
.practice-hub,.practice-hub>.sk-loading{display:flex;flex-direction:column;gap:28px;}
/* Every section opens the same way (rule 5): the eyebrow, then the heading. */
.pr-head{margin-bottom:14px;}
.pr-h2{margin:6px 0 0;font-family:var(--font-display);font-size:32px;font-weight:700;line-height:1.08;letter-spacing:-.01em;}
.pr-modes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;}
.orbit-card.pr-mode{display:flex;align-items:center;gap:16px;padding:20px 22px;color:var(--text-color);text-decoration:none;}
.pr-mode .orbit-tile{width:48px;height:48px;font-size:20px;}
.pr-mode-title{display:block;font-size:17px;font-weight:800;}
a.pr-mode:hover .pr-mode-title{color:var(--primary-hover);}
a.pr-mode:focus-visible,a.pr-row:focus-visible{outline:2px solid var(--primary);outline-offset:3px;}
/* The tile and chip tones the board adds to the shared ones: coral marks what is due or slipping (the sun stays the
   screen's one coral FILL, rule 3; these are tints), gold the drill, night the timed round. Text on each is ≥4.5:1. */
.pr-tile--coral,.pr-chip--coral{background:#FFE9E0;color:#B4451F;}
.pr-tile--gold{background:#FDEFD9;color:#9A5A0A;}
.pr-tile--night{background:var(--text-color);color:var(--orbit-night-eyebrow);}
.orbit-card.pr-coll{padding:26px 30px 16px;}
.pr-coll-head{display:flex;align-items:center;justify-content:space-between;gap:10px;}
.pr-coll .pr-h2{margin-top:4px;font-size:28px;line-height:1.1;}
.pr-see-all{display:inline-flex;align-items:center;min-height:44px;padding-bottom:0;font-size:16px;background-position:left calc(100% - 8px);}
.pr-filters{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:18px 0 8px;}
.pr-chips{display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
/* A chip that filters is a control, so it is a button with its own look: the shared `.orbit-chip` is a fact. */
.pr-filter{display:inline-flex;align-items:center;min-height:36px;padding:8px 14px;border:0;border-radius:999px;background:#F3F1F8;color:var(--text-secondary);font:inherit;font-size:13px;font-weight:800;white-space:nowrap;cursor:pointer;}
.pr-filter:hover{background:var(--orbit-violet-tint);color:var(--primary-hover);}
.pr-filter[aria-pressed="true"]{background:var(--text-color);color:#FFFFFF;}
.pr-filter:focus-visible,.pr-coll-retry:focus-visible{outline:2px solid var(--primary);outline-offset:2px;}
.pr-find{position:relative;flex:0 1 240px;margin-left:auto;}
.pr-find>i{position:absolute;top:50%;left:16px;transform:translateY(-50%);color:var(--text-muted);pointer-events:none;}
.pr-find input{box-sizing:border-box;width:100%;min-height:46px;padding:0 16px 0 44px;border:1.5px solid var(--orbit-control-edge);border-radius:14px;background:#FFFFFF;color:var(--text-color);font:inherit;font-size:15px;font-weight:700;}
.pr-find input::placeholder{color:var(--text-muted);opacity:1;}
.pr-find input:focus{outline:none;border-color:var(--primary);box-shadow:0 0 0 3px var(--orbit-violet-tint);}
.pr-rows .orbit-row{gap:14px;}
.pr-coll-rows[aria-busy="true"]{opacity:.55;}
/* The stage dot: the cool-to-warm scale (rule 4), said in words beside it for a screen reader (rule 9). */
.pr-dot{flex:none;width:12px;height:12px;border-radius:50%;background:var(--orbit-hairline);}
.pr-dot--s1{background:var(--orbit-stage-1);}
.pr-dot--s2{background:var(--orbit-stage-2);}
.pr-dot--s3{background:var(--orbit-stage-3);}
.pr-dot--s4{background:var(--orbit-stage-4);}
.pr-dot--s5{background:var(--orbit-stage-5);}
.pr-row-meta{font-size:14px;font-weight:700;color:var(--text-muted);white-space:nowrap;}
.pr-coll-note{margin:14px 0 10px;font-size:15px;line-height:1.5;color:var(--text-secondary);}
.pr-coll-retry{min-height:44px;padding:0 4px;border:0;background:none;color:var(--text-color);font:inherit;font-weight:800;text-decoration:underline 2px var(--orbit-night-eyebrow);text-underline-offset:5px;cursor:pointer;}
/* Their placeholders (Phase 177b), in the same places. */
.pr-sk-tile{flex:none;width:48px;height:48px;border-radius:12px;}
.pr-sk-chip{width:72px;height:36px;border-radius:999px;}
.pr-sk-find{flex:0 1 240px;height:46px;margin-left:auto;border-radius:14px;}

/* ── Widths ─────────────────────────────────────────────────────────────────────────────────────────────────── */
/* The cards are a column beside the main one while they are shown; below that responsive.css removes them. */
@media (min-width:1025px){#app-root>.pr-grid>.lpage-side{display:flex;flex-direction:column;align-items:stretch;gap:20px;}}
@media (max-width:1024px){#app-root>.lpage-grid.pr-grid{grid-template-columns:minmax(0,1fr);}}
/* The phone (the board at 390): 16px sides, the smaller sun and h1, the button across the panel. */
@media (max-width:640px){
    #app-root>.lpage-grid.pr-grid{padding:0 16px;}
    .pr-grid>.practice-page{gap:24px;}
    .pr-today.orbit-night{padding:26px 22px;}
    .pr-today-lead{gap:20px;margin-top:16px;}
    .pr-sun,.pr-sk-sun{width:78px;height:78px;}
    .pr-sun{font-size:30px;}
    .pr-sun-n{font-size:34px;}
    .pr-sun-n--long{font-size:24px;}
    .pr-today-title{font-size:27px;}
    .pr-today .pr-today-acts .orbit-btn,.pr-sk-btn{flex:1;width:100%;}
    .pr-h2{font-size:26px;}
    .pr-modes{grid-template-columns:minmax(0,1fr);gap:12px;}
    .orbit-card.pr-mode{padding:16px 18px;}
    .orbit-card.pr-coll{padding:22px 18px 10px;}
    .pr-find,.pr-sk-find{flex:1 1 100%;margin-left:0;}
    .pr-today{--pr-today-h:550px;}
}
/* iOS zooms the page when a field under 16px takes focus, at any width. */
@media (hover:none) and (pointer:coarse){
    .pr-find input{font-size:16px;}
}
