/* Only the pupil portal's three entry choices. */
body.pupil-three-entry .pupil-entry-grid{display:grid;grid-template-columns:minmax(0,1fr);gap:16px;align-items:stretch}
body.pupil-three-entry .pupil-entry-grid>section{box-sizing:border-box;min-width:0;margin:0;padding:22px;border:1px solid #ded8ce;border-radius:20px;background:#fce8f1;display:flex;flex-direction:column;gap:12px}
body.pupil-three-entry .pupil-entry-grid .pupil-entry-number{margin:0;font-size:12px;font-weight:800;letter-spacing:1.5px;line-height:1.4;color:#2457e6}
body.pupil-three-entry .pupil-entry-grid h2{margin:0;font-size:23px;line-height:1.2;letter-spacing:-.5px}
body.pupil-three-entry .pupil-entry-grid p{margin:0;font-size:14px;line-height:1.45}
body.pupil-three-entry .pupil-entry-grid .portal-join::before,body.pupil-three-entry .pupil-entry-grid .portal-login::before{content:none}
body.pupil-three-entry .pupil-entry-grid #pupil-login:not([hidden]){display:flex;flex-direction:column;gap:10px;min-height:0;height:auto;max-width:none;padding:0;border:0;border-radius:0;background:transparent;margin:0}
body.pupil-three-entry .pupil-entry-grid .portal-login label{margin:0;font-size:13px}
body.pupil-three-entry .pupil-entry-grid input:not([type=checkbox]){box-sizing:border-box;width:100%;font-size:16px;min-height:44px;padding:10px;margin-top:4px}
body.pupil-three-entry .pupil-entry-grid .lesson-button{order:0;min-height:44px;width:100%;padding:10px;font-size:13px;margin:0;white-space:normal}
body.pupil-three-entry .pupil-qr-trigger{display:flex;align-items:center;justify-content:center;width:100%;min-height:44px;margin:0;font-size:13px}
body.pupil-three-entry .portal-code-row{display:flex;flex-direction:column;align-items:stretch;gap:10px;flex:0 0 auto}
body.pupil-three-entry #enter-lesson-code{flex:0 0 auto}
body.pupil-three-entry .pupil-account-actions{display:flex;flex-direction:column;align-items:flex-start;gap:4px}
body.pupil-three-entry .pupil-account-actions a{font-size:13px;font-weight:700;color:#2457e6;min-height:28px;display:flex;align-items:center}
body.pupil-three-entry .pupil-account-actions span{font-size:12px}
body.pupil-three-entry .portal-login>.small{font-size:12px;line-height:1.4}
body.pupil-three-entry .pupil-feide{position:relative;overflow:hidden;isolation:isolate;min-height:240px}
body.pupil-three-entry .pupil-feide img{display:block;width:100%;max-width:300px;height:auto;object-fit:contain;margin:auto;pointer-events:none}
body.pupil-three-entry .pupil-feide .lesson-button{margin-top:auto}
body.pupil-three-entry .pupil-feide-veil{position:absolute;inset:0;z-index:1;display:flex;align-items:center;justify-content:center;background:rgba(255,255,255,.55)}
body.pupil-three-entry .pupil-feide-veil span{transform:rotate(-27deg);font-size:clamp(28px,3vw,48px);font-weight:900;letter-spacing:3px;color:#111;white-space:nowrap}
@media (min-width:761px){
 body.pupil-three-entry .pupil-entry-grid[data-mobile-pane=learn]{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px;flex:1;min-height:0;overflow:auto;align-items:stretch}
 body.pupil-three-entry .pupil-entry-grid>section{min-height:420px;height:auto}
 body.pupil-three-entry .pupil-entry-grid .portal-join{height:auto}
 body.pupil-three-entry .pupil-main [data-mobile-pane=account]{display:block}
 body.pupil-three-entry .pupil-entry-grid #pupil-account h2{overflow-wrap:anywhere}
 @media(max-height:780px){body.pupil-three-entry .pupil-entry-grid>section{padding:14px;gap:8px}body.pupil-three-entry .pupil-entry-grid h2{font-size:21px}}
}

/* Signed-in pupils choose an activity, without repeating account entry. */
body.pupil-three-entry .pupil-entry-grid>section[hidden],body.pupil-three-entry #pupil-bank-open[hidden]{display:none!important}
body.pupil-three-entry.pupil-signed-in #pupil-login{display:none!important}
body.pupil-three-entry.pupil-signed-in #pupil-account{display:flex;flex-direction:column;gap:12px}
body.pupil-three-entry.pupil-signed-in #pupil-bank-open{display:flex;align-items:center;justify-content:center;text-decoration:none;margin-top:12px}
@media (min-width:761px){
 body.pupil-three-entry.pupil-signed-in .pupil-entry-grid[data-mobile-pane=learn]{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* Class participation and the shared account entrance are the two entry choices. */
@media(min-width:761px){body.pupil-three-entry .pupil-entry-grid[data-mobile-pane=learn]{grid-template-columns:repeat(2,minmax(0,1fr))}}
body.pupil-three-entry #pupil-login>a{display:flex;align-items:center;justify-content:center;min-height:48px;text-decoration:none;box-sizing:border-box}

/* Signed-in desktop pupils enter the class here; the shared header opens the bank. */
@media(min-width:761px){
 body.pupil-three-entry.pupil-signed-in.pupil-entry-desktop .pupil-entry-grid[data-mobile-pane=learn]{grid-template-columns:minmax(0,640px);justify-content:center;align-content:center;align-items:start}
 body.pupil-three-entry.pupil-signed-in.pupil-entry-desktop .pupil-account-panel,
 body.pupil-three-entry.pupil-signed-in.pupil-entry-desktop .pupil-entry-number{display:none!important}
 body.pupil-three-entry.pupil-signed-in.pupil-entry-desktop .pupil-entry-grid>.portal-join{height:auto;min-height:0;padding:28px;gap:14px}
 body.pupil-three-entry.pupil-signed-in.pupil-entry-desktop .portal-join::before{content:none}
 body.pupil-three-entry.pupil-signed-in.pupil-entry-desktop #enter-lesson-code{flex:0 0 auto}
 body.pupil-three-entry.pupil-signed-in.pupil-entry-desktop .portal-code-row{flex:0 0 auto;gap:10px}
}
@media(min-width:761px) and (max-height:780px){
 body.pupil-three-entry.pupil-signed-in.pupil-entry-desktop .pupil-entry-grid[data-mobile-pane=learn]{align-content:start}
 body.pupil-three-entry.pupil-signed-in.pupil-entry-desktop .pupil-entry-grid>.portal-join{padding:20px;gap:10px}
}

/* A pupil who registered email continues with class, without duplicate signup. */
body.pupil-three-entry.pupil-registration-pending .pupil-entry-grid[data-mobile-pane=learn]{grid-template-columns:minmax(0,640px)!important;justify-content:center}
body.pupil-three-entry.pupil-registration-pending .pupil-account-panel,body.pupil-three-entry.pupil-registration-pending .mobile-library-hint{display:none!important}
