/* A real board and a connected learning route give the returning home its purpose. */
.setup-panel.nightline-returning-mode:not([hidden]){display:flex;flex-direction:column;align-items:stretch;gap:0;margin:0;padding-top:12px}
.setup-panel.nightline-returning-mode>.setup-lang{margin:24px 0}
.setup-panel.nightline-returning-mode>.setup-title{margin:24px 0 16px}
.setup-panel.nightline-returning-mode>.level-grid{margin:0 0 28px}
.nightline-return{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(230px,.75fr);column-gap:64px;row-gap:36px;padding:38px 40px 28px;border:1px solid var(--line-ui);border-radius:24px;background:var(--surface);min-width:0;position:relative;overflow:hidden}
.nightline-return[hidden],.nightline-route[hidden],.nightline-return [hidden]{display:none!important}
.returning-copy{align-self:center;min-width:0}
.nightline-return h2{font:500 clamp(32px,4vw,52px)/1.08 var(--serif);letter-spacing:-.035em;max-width:15ch;white-space:pre-line;text-wrap:balance;margin:0 0 18px}
#nightlineReturningSummary{font-size:14px;line-height:1.5;color:var(--text-muted);margin:0}
.nightline-return-path{display:flex;gap:6px;margin:20px 0 24px;max-width:360px}
.nightline-return-path span{height:7px;flex:1;border-radius:4px;background:var(--hair-soft);position:relative}
.nightline-return-path .is-found{background:var(--accent)}
.nightline-return-path span.is-found:last-of-type::after{content:'';position:absolute;width:11px;height:11px;right:0;top:-2px;background:var(--accent);border:2px solid var(--surface);border-radius:50%}
.nightline-return-actions{display:flex;flex-wrap:wrap;align-items:center;gap:12px 18px}
#nightlineContinue{font-size:15px;min-height:52px;padding:12px 26px;border-radius:12px}
.nightline-return-actions .returning-change{background:transparent;color:var(--text-muted);border:0;padding:8px 0;min-height:44px;font-size:13px;text-decoration:underline;text-underline-offset:5px;text-align:left}
.returning-preview{align-self:center;justify-self:end;width:min(100%,290px);border:0;background:transparent;padding:8px;position:relative;transform:rotate(3deg);transition:transform .25s var(--ease-out);color:var(--text)}
.returning-preview:hover{transform:rotate(0)}
.returning-mini-grid{display:grid;grid-template-columns:repeat(var(--preview-size,5),1fr);gap:4px;transform:perspective(700px) rotateY(-8deg);filter:drop-shadow(0 14px 14px rgb(0 0 0 / .2))}
.returning-mini-grid>span{display:grid;place-items:center;aspect-ratio:1;border:1px solid var(--tile-border);border-radius:8px;background:var(--tile);font:500 clamp(14px,2vw,23px)/1 var(--serif);color:var(--text)}
.returning-mini-grid .is-wall{visibility:hidden}
.returning-mini-grid .is-found{background:var(--path-colour);color:#10162a;border-color:transparent}
.returning-preview-label{display:block;text-align:right;font-size:12px;color:var(--accent);margin-top:12px}
.returning-lesson-route{grid-column:1/-1;display:flex;padding:24px 0 0;border-top:1px solid var(--hair-soft);gap:0}
.returning-lesson-route>a{display:grid;grid-template-columns:28px minmax(0,1fr);align-content:start;gap:5px 10px;flex:1;position:relative;padding:8px 14px 8px 0;text-decoration:none;color:var(--text);min-width:0}
.returning-lesson-route>a:not(:last-child)::after{content:'';position:absolute;left:28px;right:10px;top:21px;height:1px;background:var(--line-ui);z-index:0}
.returning-lesson-route strong{font-weight:500;font-size:16px;background:var(--surface);position:relative;z-index:1;justify-self:start;padding-right:10px;line-height:1.65}
.route-station{width:26px;height:26px;border:1px solid var(--line-ui);border-radius:50%;background:var(--surface);position:relative;z-index:1;align-self:start}
.route-station::after{content:'';position:absolute;inset:7px;border-radius:50%;background:var(--line-ui)}
.returning-lesson-route .is-ready .route-station{border-color:var(--accent)}
.returning-lesson-route .is-ready .route-station::after{background:var(--accent)}
.returning-lesson-route small{grid-column:2;color:var(--text-muted);font-size:12px;line-height:1.5}
.returning-lesson-route>a:hover strong{color:var(--accent)}
.returning-recent{grid-column:1/-1;border-top:1px solid var(--hair-soft);padding-top:20px;min-width:0}
.returning-recent>p{font-size:12px;color:var(--text-muted);margin:0 0 14px}
.returning-recent>div{display:flex;gap:12px 24px;flex-wrap:wrap}
.returning-recent a{display:flex;flex-direction:column;gap:4px;color:var(--text);text-decoration:none;min-height:44px;justify-content:center}
.returning-recent strong{font:500 20px/1.2 var(--serif)}
.returning-recent a>span{font-size:12px;color:var(--text-muted)}
.returning-recent a:hover strong{color:var(--accent)}
#nightlineHomeReview{display:none!important} /* The connected Recall station replaces this old duplicate action. */
@media(max-width:720px){.nightline-return{padding:24px;column-gap:24px;row-gap:24px;grid-template-columns:minmax(0,1fr) 155px;border-radius:18px}.nightline-return h2{font-size:32px;max-width:13ch;margin-bottom:14px}.returning-preview{padding:0;width:155px}.returning-mini-grid{gap:3px}.returning-mini-grid>span{border-radius:5px;font-size:15px}.nightline-return-path{margin:16px 0 20px}.nightline-return-actions{gap:2px}#nightlineContinue{padding-inline:18px;font-size:14px}.returning-lesson-route{padding-top:20px}.returning-lesson-route>a{grid-template-columns:20px 1fr;gap:7px;padding-right:10px}.route-station{width:19px;height:19px;margin-top:2px}.route-station::after{inset:5px}.returning-lesson-route strong{font-size:14px;line-height:1.6;padding-right:4px}.returning-lesson-route>a:not(:last-child)::after{left:20px;top:19px}.returning-lesson-route small{font-size:11px}}
@media(max-width:480px){.nightline-return{padding:22px 18px;grid-template-columns:minmax(0,1fr) 106px;column-gap:14px;row-gap:22px}.nightline-return h2{font-size:29px;max-width:13ch}.returning-preview{width:106px;align-self:start;margin-top:9px}.returning-mini-grid>span{font-size:11px;border-radius:4px}.returning-mini-grid{gap:2px}.returning-preview-label{font-size:10px}.nightline-return-actions{width:calc(100% + 120px)}#nightlineContinue{width:100%}.returning-change{width:100%}.nightline-return-path{width:calc(100% + 120px)}.returning-lesson-route{gap:8px}.returning-lesson-route>a{grid-template-columns:1fr;gap:8px;padding-right:0}.returning-lesson-route strong,.returning-lesson-route small{grid-column:1}.returning-lesson-route strong{font-size:13px;line-height:1.4;word-break:normal;overflow-wrap:anywhere}.returning-lesson-route>a:not(:last-child)::after{left:20px;right:0;top:19px}.returning-recent>div{gap:12px 20px}.returning-recent strong{font-size:18px}}
@media(prefers-reduced-motion:reduce){.returning-preview{transform:none;transition:none}.returning-mini-grid{transform:none}}
@media(max-width:360px){.nightline-return{grid-template-columns:minmax(0,1fr)}.nightline-return h2{font-size:24px;max-width:calc(100% - 96px);white-space:pre-line;line-height:1.12}.returning-preview{position:absolute;top:25px;right:18px;width:84px;margin:0}.nightline-return-actions,.nightline-return-path{width:100%}.returning-mini-grid>span{font-size:9px}.returning-preview-label{font-size:9px}}
/* The change action lands on the actual chooser, rather than leaving it below the fold. */
#setupTitle{scroll-margin-top:24px}
.returning-options-open>.setup-title:focus{outline:none}
.returning-options-open>.setup-title:focus-visible{outline:2px solid var(--accent);outline-offset:6px}
/* Collected words become a tangible, linked collection rather than an unstructured text run. */
.returning-recent>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.returning-recent a{--token:var(--accent);position:relative;display:flex;flex-direction:column;gap:6px;min-width:0;padding:13px 10px 10px;border-radius:5px 15px 15px 15px;background:color-mix(in oklch,var(--token) 13%,var(--bg));border:1px solid color-mix(in oklch,var(--token) 45%,var(--line-ui));text-decoration:none;transition:translate .2s ease,background .2s ease}
.returning-recent a:nth-child(3n+2){--token:var(--gold-text)}
.returning-recent a:nth-child(3n){--token:var(--success)}
.returning-recent a::before{content:'';width:13px;height:3px;border-radius:3px;background:var(--token)}
.returning-recent a:hover,.returning-recent a:focus-visible{translate:0 -3px;background:color-mix(in oklch,var(--token) 22%,var(--bg))}
.returning-recent strong{font-size:16px;overflow-wrap:anywhere}
.returning-recent a span{font-size:11px;line-height:1.4;color:var(--text)}
@media(max-width:360px){.returning-recent>div{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(prefers-reduced-motion:reduce){.returning-recent a{transition:none}.returning-recent a:hover,.returning-recent a:focus-visible{translate:none}}
