/* Wave 3: skill trails, streak and day goal, parent panel, motor games. Type sizes come only from the --t-* scale in app.css. */

.gl,.wk-note,.q-t,.dline,.trl-t span,.dsn,.dss{text-wrap:balance}

/* skill trails on the hub */
.trails{margin-top:var(--u)}
.trl-list{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
@media (min-width:900px){.trl-list{grid-template-columns:repeat(4,minmax(0,1fr))}}
.trl-card{display:grid;grid-template-columns:auto minmax(0,1fr);grid-template-areas:"art n" "t t";gap:6px 10px;align-items:center;height:100%;padding:12px;border-radius:var(--r);background:var(--white);border:2px solid var(--line);text-decoration:none}
.trl-card:hover{border-color:var(--navy)}
img.trl-art{grid-area:art;width:56px;height:56px}
.trl-t{grid-area:t;display:flex;flex-direction:column;gap:2px;min-width:0}
.trl-t b{font:var(--w-title) var(--t-body)/var(--lh-ui) var(--h)}
.trl-t span{font-size:var(--t-xs);line-height:var(--lh-xs);color:var(--muted)}
.trl-n{grid-area:n;justify-self:end;display:flex;flex-direction:column;align-items:flex-end}
.trl-n b{font:var(--w-title) var(--t-2xl)/var(--lh-1) var(--h);color:var(--navy)}
.trl-n span{font-size:var(--t-xs);color:var(--muted);font-weight:var(--w-strong)}
.trl-math{background:#e6f3df}.trl-language{background:#e3f0f8}.trl-motor{background:#fdf0cf}.trl-faith{background:#ece6f6}
i.trl{font-style:normal;display:inline-block;padding:2px 8px;margin-right:8px;border-radius:999px;font-size:var(--t-xs);font-weight:var(--w-strong);color:var(--navy);border:1px solid var(--line)}

/* day goal and streak: one quiet strip inside the garden card */
.dstrip{margin-top:12px}
.wk{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:6px}
.wd{display:flex;flex-direction:column;align-items:center;gap:2px;min-width:0}
img.wdi{width:100%;max-width:44px;height:auto;border-width:2px;box-shadow:none;filter:grayscale(1);opacity:.3}
.wd.on img.wdi{filter:none;opacity:1}
.wd.rest img.wdi{opacity:.55;border-style:dashed}
.wd.now img.wdi{opacity:1;border-color:var(--navy)}
.wd.soon img.wdi{opacity:.18}
.wdl{font-size:var(--t-xs);line-height:var(--lh-1);font-weight:var(--w-strong);color:var(--muted)}
.gtiles-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.gtiles-4{grid-template-columns:repeat(4,minmax(0,1fr))}
@media (max-width:560px){.gtiles-4{grid-template-columns:repeat(2,minmax(0,1fr))}}
.gtile.goal-done,.gtile.streak{background:#fdf0cf;border-color:var(--gold)}
.dstrip.soft .gtile.streak{background:var(--white);border-color:var(--line)}
.wk-note{margin-top:8px;font-size:var(--t-sm);line-height:var(--lh-sm);color:var(--muted);font-weight:var(--w-strong)}
.dstrip-done{max-width:460px;margin:0 auto 14px}
.dline{margin-top:6px;font-size:var(--t-body);font-weight:var(--w-strong);color:var(--gold-ink);text-align:center}
.done-card .dstrip-done .dline{margin:6px 0 0;font-size:var(--t-body);color:var(--gold-ink)}
.gcard .gtiles{grid-template-columns:repeat(2,minmax(0,1fr))}

/* parent panel */
.dev{flex:1 1 100%;margin-top:6px;padding-top:12px;border-top:1px solid var(--line);display:flex;flex-direction:column;gap:12px}
.dev h3{font-size:var(--t-lg)}
.dtrail{padding:12px;border-radius:var(--r);border:2px solid var(--line)}
.dtrail-math{background:#f3faee}.dtrail-language{background:#f0f7fc}.dtrail-motor{background:#fff8e6}.dtrail-faith{background:#f5f1fa}
.dth{display:flex;align-items:center;gap:10px;margin-bottom:10px}
.dth b{font:var(--w-title) var(--t-lg)/var(--lh-ui) var(--h)}
.dtn{margin-left:auto;display:flex;align-items:baseline;gap:6px}
.dtn b{font:var(--w-title) var(--t-2xl)/var(--lh-1) var(--h)}
.dtn span{font-size:var(--t-xs);color:var(--muted);font-weight:var(--w-strong)}
.dskills{display:grid;grid-template-columns:repeat(auto-fill,minmax(132px,1fr));gap:8px}
.dsk{display:flex;flex-direction:column;gap:2px;min-width:0;padding:8px 10px;border-radius:14px;background:var(--white);border:1px solid var(--line)}
.dsk.none .gn{color:var(--muted)}
.dsn{font-size:var(--t-sm);line-height:var(--lh-xs);font-weight:var(--w-strong)}
.dss{font-size:var(--t-xs);color:var(--muted)}
.dnext{font-size:var(--t-body);color:var(--navy)}
.dev-foot{margin-top:14px;padding:10px 14px;border-left:4px solid var(--gold);border-radius:10px;background:var(--cream);font-size:var(--t-sm);line-height:var(--lh-sm);color:var(--muted);font-weight:var(--w-strong)}
.kid{flex-wrap:wrap}

/* quiz extras */
img.art.big{width:clamp(96px,28vw,140px);height:clamp(96px,28vw,140px)}
.q-vis.items .qm{font:var(--w-title) var(--t-2xl)/var(--lh-1) var(--h);color:var(--gold-ink);padding:0 8px}
.q-vis.take .gone img{opacity:.25;filter:grayscale(1)}
.q-vis.take span{display:inline-flex}
.opt .grp{display:flex;flex-wrap:wrap;gap:3px;justify-content:center;align-items:center}
.opt .grp img.ci{width:clamp(26px,7vw,36px);height:clamp(26px,7vw,36px);border-width:2px;box-shadow:none}
.q-vis.verse-q{font-size:var(--t-xl);line-height:var(--lh-xl);min-height:0;padding:8px 10px;text-wrap:balance}

/* motor: tracing */
.trace{display:grid;justify-items:center;gap:10px}
.trace-cv,.maze-cv{width:100%;max-width:440px;aspect-ratio:1;border-radius:var(--r);border:3px solid var(--gold);background:#fffdf6;touch-action:none;cursor:crosshair;box-shadow:var(--shadow)}
.maze-cv{background:#e6f3df;border-color:var(--ok);cursor:grab}
.trace-win{min-height:76px;display:flex;align-items:center;justify-content:center;gap:12px}
.trace-win p{font:var(--w-title) var(--t-lg)/var(--lh-lg) var(--h);color:var(--navy)}
img.tw{width:72px;height:72px}
.trace-row{justify-content:center;margin-top:0}
.maze{display:grid;justify-items:center;gap:10px}

/* motor: drag and fit */
.fitbox{position:relative;width:100%;max-width:560px;margin:0 auto;aspect-ratio:4/3;border-radius:var(--r);background:linear-gradient(180deg,#f3fae9 0 48%,#fdf0cf 48% 100%);border:2px solid var(--line);touch-action:none}
.fslot,.fpiece{position:absolute;translate:-50% -50%;width:calc(88% / var(--n,4));max-width:110px;aspect-ratio:1;padding:0;border:0;background:none;border-radius:50%}
.fslot{opacity:.5;filter:grayscale(1) brightness(.6)}
.fslot img.art,.fpiece img.art{width:100%;height:100%}
.fslot.full{opacity:0}
.fpiece{cursor:grab;touch-action:none;transition:left .25s ease,top .25s ease}
.fpiece.set{cursor:default}
.fpiece.pick img.art{border-color:var(--navy);box-shadow:0 0 0 4px rgba(27,47,87,.25)}
.fpiece:focus-visible{outline:3px solid var(--gold);outline-offset:3px}

/* motor: echo beats */
.pads{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;max-width:360px;margin:0 auto}
.pad{aspect-ratio:1;display:grid;place-items:center;padding:10px;border-radius:var(--r);border:3px solid var(--line);background:var(--cream);cursor:pointer}
.pad img.art{width:70%;height:70%}
.pad.lit{background:#fdf0cf;border-color:var(--gold);box-shadow:0 0 0 6px rgba(200,137,27,.35)}
.pad:disabled{cursor:default}

/* synthesis pass (13/nov): today's goal and the week of stars sit right under Joy's pick (app.js moves the strip out of the
   garden card): play, and today's star lights up. Quiet material, no frame: it belongs to the hero, it is not a second card. */
.hub-today:empty{display:none}
.hub-today{margin-top:14px}
.hub-today .dstrip{margin:0;display:grid;grid-template-columns:minmax(0,1fr);gap:10px;padding:12px 14px;border-radius:var(--r);background:color-mix(in srgb,var(--white) 55%,var(--cream))}
.hub-today .gtiles{margin-top:0}
.hub-today .wk-note{margin-top:0}
@media (min-width:760px){
  .hub-today .dstrip{grid-template-columns:minmax(0,1.5fr) minmax(0,1fr);grid-template-areas:"wk tiles" "note tiles";align-items:center;column-gap:20px;padding:14px 18px}
  .hub-today .wk{grid-area:wk}.hub-today .gtiles{grid-area:tiles}.hub-today .wk-note{grid-area:note}
}
@media (max-width:759px){
  .hub-today .dstrip.no-streak{grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);grid-template-areas:"wk wk" "tiles note";align-items:center}
  .hub-today .dstrip.no-streak .wk{grid-area:wk}.hub-today .dstrip.no-streak .gtiles{grid-area:tiles}.hub-today .dstrip.no-streak .wk-note{grid-area:note}
}
/* a streak of zero is not news: the day goal stands alone until there is a streak to show */
.dstrip.no-streak .gtile.streak{display:none}
.dstrip.no-streak .gtiles-2{grid-template-columns:minmax(0,1fr)}
/* a brand-new week: four doors without four zeros (ux-spec 8.3) */
.trails.trl-zero .trl-n{display:none}
#homeTrails .trails{margin-top:0}
.trl-card{align-content:start}
/* on a phone the trail name says enough (Math, Language, Motor, Faith and Heart): the four doors fit in one screen-width block */
@media (max-width:560px){#homeTrails .trl-t span{display:none}#homeTrails img.trl-art{width:44px;height:44px}#homeTrails .trl-card{padding:10px 12px}}
@media (max-width:759px){#v-home[data-band="2-3"] .hub-today .dstrip{grid-template-columns:minmax(0,1fr);grid-template-areas:"wk" "tiles"}}

/* ages 2 to 3: fewer words, bigger doors. Pictures, names and one button per card; the grown-up numbers live in the parent panel */
#v-home[data-band="2-3"] #homeTrails,
#v-home[data-band="2-3"] .world .sub,
#v-home[data-band="2-3"] .world .prog,
#v-home[data-band="2-3"] .wk-note,
#v-home[data-band="2-3"] .gcard .gtiles,
#v-home[data-band="2-3"] .gcard .tlink{display:none}
#v-home[data-band="2-3"] .world b{font-size:var(--t-lg)}
#v-home[data-band="2-3"] .world .wb{justify-content:center;min-height:64px}
#v-home[data-band="2-3"] .hub-pair .gcard .cta-row .btn{flex:1;min-height:64px;font-size:var(--t-lg)}
