/* Math Pop: shared navigation and homepage, isolated from the lesson UI. */
:root {
    --mp-font: Arial, Helvetica, sans-serif;
    --mp-display-font: 'Arial Black', Arial, Helvetica, sans-serif;
    --mp-ink: #141414;
    --mp-paper: #fff;
    --mp-lime: #dfff88;
    --mp-orange: #ff6508;
    --mp-blue: #5263e8;
    --mp-outline: #171717;
    --mp-muted: #62646d;
    --mp-teacher-tint: #e5e9ff;
    --mp-line: 2px solid var(--mp-ink);
    --mp-line-thin: 1.5px solid var(--mp-ink);
    --mp-shadow: 3px 4px 0 var(--mp-ink);
    --mp-shell-width: 1620px;
    --mp-shell-gutters: 40px;
    --mp-page-spacing:24px;
    --mp-h1:900 clamp(28px,3.8vw,48px)/1.08 var(--mp-display-font);
    --mp-h2:800 clamp(20px,2.1vw,25px)/1.25 var(--mp-font);
    --mp-h3:700 17px/1.35 var(--mp-font);
}
.mp-header, .mp-header *, .mp-home, .mp-home *, .mp-hero, .mp-hero * { box-sizing: border-box; }
.mp-home { margin: 0; background: #f7f7f5; color: var(--mp-ink); font-family: Arial, Helvetica, sans-serif; }
.mp-shell { box-sizing: border-box; width: var(--mp-shell-width); max-width: calc(100% - var(--mp-shell-gutters)); margin-inline: auto; }
.mp-header { position: relative; z-index: 20; font-family: Arial, Helvetica, sans-serif; color: var(--mp-ink); background: transparent; padding: 18px 0 0; }
.mp-header-inner {
    display: flex; align-items: center; gap: 30px; min-height: 108px; padding: 18px 30px;
    background: var(--mp-paper); border: 2px solid var(--mp-outline); border-radius: 22px;
}
.mp-home .mp-header-inner { border-radius: 22px 22px 0 0; border-bottom: 0; }
.mp-logo-slot { display: block; width: 210px; height: 65px; flex: 0 0 210px; text-decoration: none; }
.mp-nav { display: flex; align-items: center; justify-content: center; flex: 1 1 auto; gap: clamp(16px, 2.2vw, 37px); }
.mp-nav a, .mp-desktop-logout {
    color: var(--mp-ink); font-size: clamp(15px, 1.4vw, 21px); font-weight: 800;
    text-decoration: none; white-space: nowrap; padding: 14px 0 10px; border-bottom: 4px solid #d0d0d0;
    transition: border-color .15s, color .15s;
}
.mp-nav a:hover, .mp-nav a:focus-visible, .mp-nav a[aria-current="page"], .mp-desktop-logout:hover { border-color: var(--mp-blue); color: #384ac5; }
.mp-header-actions { display: flex; align-items: center; gap: 18px; flex: 0 0 auto; margin-left: auto; }
.mp-icon-button { display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 10px; color: var(--mp-ink); background: transparent; cursor: pointer; padding: 9px; }
.mp-icon-button svg { width: 100%; height: 100%; }
.mp-icon-button:hover { background: #eef0ff; }
.mp-avatar { display: block; width: 58px; height: 58px; border: 2px solid var(--mp-ink); border-radius: 50%; overflow: hidden; box-shadow: 2px 3px 0 var(--mp-ink); }
.mp-avatar svg { display: block; width: 100%; height: 100%; }
.mp-desktop-logout { font-size: 15px; }
.mp-notifications { position: relative; }
.mp-notifications-panel { position: absolute; top: 57px; right: 0; width: 245px; padding: 18px; background: var(--mp-paper); border: 2px solid var(--mp-ink); border-radius: 14px; box-shadow: 4px 5px 0 var(--mp-ink); z-index: 30; font-size: 16px; }
.mp-notifications-panel p { margin: 12px 0 0; font-size: 14px; }
.mp-notifications-panel[hidden] { display: none; }
.mp-burger, .mp-nav .mp-mobile-profile, .mp-nav .mp-mobile-logout { display: none; }
.mp-header a:focus-visible, .mp-header button:focus-visible, .mp-start:focus-visible, .mp-login input:focus-visible { outline: 3px solid #3b50e2; outline-offset: 4px; }

.mp-main { border: 2px solid var(--mp-outline); border-top: 0; border-radius: 0 0 22px 22px; background: var(--mp-paper); overflow: hidden; margin-bottom: 30px; }
.mp-hero {
    position: relative; isolation: isolate; overflow: hidden; min-height: 590px; height: clamp(530px, 43vw, 660px);
    display: flex; align-items: center; padding: 55px 5.2%; background: #8da1ff;
}
.mp-hero-background, .mp-hero-art { position: absolute; inset: 0; pointer-events: none; }
.mp-hero-background { z-index: -2; overflow: hidden; }
.mp-shape { position: absolute; inset: 0; }
.mp-shape-lime { background: var(--mp-lime); clip-path: polygon(0 10%, 18% 0, 29% 5%, 37% 0, 53% 11%, 67% 5%, 69% 86%, 34% 100%, 0 91%); }
.mp-shape-orange { background: var(--mp-orange); clip-path: polygon(51% 6%, 74% 0, 78% 12%, 85% 4%, 98% 20%, 96% 87%, 72% 95%, 58% 64%); }
.mp-shape-blue { background: #4a62e8; clip-path: polygon(0 23%, 6% 20%, 3% 60%, 0 80%, 11% 93%, 8% 100%, 0 100%); }
.mp-checker { position: absolute; width: 95px; height: 280px; background: conic-gradient(#111 25%, var(--mp-paper) 0 50%, #111 0 75%, var(--mp-paper) 0) 0 0 / 44px 44px; }
.mp-checker-left { left: -48px; top: 30%; transform: rotate(9deg); }
.mp-checker-right { width: 180px; height: 110px; right: -24px; bottom: -19px; transform: rotate(-9deg); }
.mp-dots { position: absolute; right: 3%; top: 4%; width: 200px; height: 125px; background-image: radial-gradient(#15151555 1.3px, transparent 1.5px); background-size: 9px 9px; transform: rotate(-8deg); mask-image: linear-gradient(110deg, transparent, #000); }
.mp-hero-copy { position: relative; z-index: 3; width: 59%; display: flex; flex-direction: column; align-items: flex-start; gap: 35px; }
.mp-hero-copy h1 { margin: 0; font-family: 'Arial Black', Arial, Helvetica, sans-serif; font-size: clamp(40px, 4.65vw, 77px); font-weight: 1000; line-height: 1.08; letter-spacing: -.055em; transform: rotate(-4deg); color: #080808; }
.mp-hero-copy h1 span { display: table; background: var(--mp-paper); padding: .14em .22em .15em; box-shadow: 7px 8px 0 #111; white-space: nowrap; }
.mp-hero-copy h1 span + span { margin-top: 10px; margin-left: .35em; }
.mp-tagline { background: #fffdf5; border: 2px solid var(--mp-paper); border-radius: 15px; padding: 18px 22px; max-width: 470px; margin: 0; font-size: clamp(20px, 2.1vw, 30px); line-height: 1.2; font-weight: 800; transform: rotate(-1.5deg); }
.mp-start { display: inline-flex; gap: 24px; align-items: center; justify-content: center; background: var(--mp-blue); border: 3px solid var(--mp-paper); border-radius: 19px; box-shadow: 5px 6px 0 #151515; text-decoration: none; color: var(--mp-paper); font-size: clamp(20px, 2.1vw, 31px); font-weight: 900; padding: 23px 30px; transform: rotate(-1deg); transition: transform .16s, background .16s, box-shadow .16s; white-space: nowrap; }
.mp-start svg { width: 28px; height: 28px; flex: none; }
.mp-start:hover { transform: translate(-2px, -3px) rotate(-1deg); box-shadow: 8px 9px 0 #151515; background: #394bc9; }
.mp-start:active { transform: translate(4px, 4px); box-shadow: 1px 2px 0 #151515; }
.mp-hero-art { z-index: 1; }
.mp-monkey { position: absolute; bottom: -1px; left: 34%; width: 61%; height: auto; max-height: 97%; object-fit: contain; object-position: bottom center; filter: drop-shadow(0 0 1px var(--mp-paper)); }
.mp-crown { position: absolute; top: 4%; left: 50%; width: 105px; transform: rotate(-9deg); }
.mp-spark { position: absolute; top: 15%; right: 25%; font-size: 60px; color: white; font-weight: 800; }
.mp-formula { position: absolute; z-index: 2; background: #fffdf8; border: 6px solid white; color: var(--mp-ink); box-shadow: 6px 8px 0 var(--mp-ink); padding: 20px 15px; text-align: center; font-family: Georgia, serif; font-size: clamp(20px, 2.2vw, 35px); font-style: italic; white-space: nowrap; }
.mp-formula-first { right: 2%; top: 13%; transform: rotate(-11deg); }
.mp-formula-second { right: 2%; top: 47%; transform: rotate(8deg); font-size: clamp(17px, 1.8vw, 29px); }
.mp-formula i { display: block; height: 4px; border-radius: 50%; background: #ff5900; width: 78%; margin: 14px auto 0; transform: rotate(-4deg); }
.mp-fraction { display: inline-flex; flex-direction: column; align-items: center; vertical-align: middle; gap: 4px; }
.mp-fraction > span:first-child { border-bottom: var(--mp-line); padding: 0 4px 3px; }

.mp-login { padding: 35px 5.2% 45px; background: var(--mp-paper); }
.mp-login h2 { margin: 0 0 20px; font-size: 28px; }
.mp-login form { max-width: 470px; display: grid; gap: 12px; scroll-margin-top: 20px; }
.mp-login label { display: grid; gap: 6px; font-weight: 700; }
.mp-login input { border: 2px solid var(--mp-ink); border-radius: 10px; font: inherit; padding: 13px 15px; width: 100%; }
.mp-login input[type="submit"] { background: var(--mp-lime); cursor: pointer; font-weight: 800; box-shadow: 3px 3px 0 var(--mp-ink); }
.mp-login #error { min-height: 1.4em; color: #a12121; }

@media (max-width: 1250px) {
    .mp-header-inner { gap: 16px; padding-inline: 20px; }
    .mp-logo-slot { width: 130px; flex-basis: 130px; }
    .mp-header-actions { gap: 12px; }
    .mp-nav { gap: 18px; }
    .mp-hero { min-height: 510px; }
}
@media (max-width: 1024px) {
    :root { --mp-shell-gutters: 28px; }
    .mp-header { padding-top: 14px; }
    .mp-header-inner { min-height: 84px; padding: 12px 20px; gap: 12px; }
    .mp-logo-slot { width: 160px; flex-basis: 160px; height: 46px; }
    .mp-burger { display: grid; order: 3; }
    .mp-header-actions { margin-left: auto; }
    .mp-desktop-logout { display: none; }
    .mp-nav { display: none; position: absolute; left: 14px; right: 14px; top: calc(100% - 2px); background: var(--mp-paper); padding: 18px 24px; border: 2px solid var(--mp-ink); border-radius: 0 0 16px 16px; box-shadow: 0 6px 0 #151515; z-index: 40; }
    .mp-nav.is-open { display: flex; flex-direction: column; align-items: stretch; gap: 2px; }
    .mp-nav a, .mp-nav .mp-mobile-profile, .mp-nav .mp-mobile-logout { display: block; font-size: 18px; padding: 13px 3px; border-bottom-width: 2px; }
    .mp-hero { min-height: 490px; height: 56vw; padding: 38px 5%; }
    .mp-hero-copy { gap: 26px; }
    .mp-hero-copy h1 { font-size: clamp(35px, 5vw, 54px); }
    .mp-tagline { max-width: 320px; font-size: 21px; padding: 14px 16px; }
    .mp-start { padding: 19px 22px; gap: 14px; font-size: 23px; }
    .mp-monkey { left: 36%; width: 67%; }
    .mp-formula { padding: 14px 10px; border-width: 4px; }
    .mp-formula-second { top: 43%; }
}
@media (max-width: 640px) {
    :root { --mp-shell-gutters: 20px; }
    .mp-header { padding-top: 10px; }
    .mp-header-inner { min-height: 70px; padding: 10px 12px; gap: 7px; border-radius: 16px; }
    .mp-home .mp-header-inner { border-radius: 16px 16px 0 0; }
    .mp-main { border-radius: 0 0 16px 16px; }
    .mp-logo-slot { width: 90px; flex-basis: 90px; height: 42px; }
    .mp-header-actions { gap: 7px; }
    .mp-avatar { width: 42px; height: 42px; box-shadow: 1px 2px 0 var(--mp-ink); }
    .mp-icon-button { width: 39px; height: 39px; padding: 7px; }
    .mp-nav { left: 10px; right: 10px; padding: 12px 18px; }
    .mp-notifications-panel { right: -52px; width: min(245px, calc(100vw - 42px)); }
    .mp-hero { min-height: 0; height: auto; display: block; padding: 38px 20px 0; }
    .mp-hero-copy { width: 100%; align-items: flex-start; gap: 20px; }
    .mp-hero-copy h1 { font-size: clamp(27px, 6.7vw, 43px); letter-spacing: -.045em; }
    .mp-hero-copy h1 span { box-shadow: 4px 5px 0 #111; }
    .mp-hero-copy h1 span + span { margin-top: 7px; margin-left: .15em; }
    .mp-tagline { max-width: 300px; font-size: 18px; padding: 12px 15px; }
    .mp-start { font-size: clamp(16px, 4.4vw, 22px); padding: 15px 18px; gap: 12px; border-radius: 14px; }
    .mp-start svg { width: 22px; height: 22px; }
    .mp-hero-art { position: relative; inset: auto; height: clamp(205px, 66vw, 345px); margin: 8px -20px 0; }
    .mp-monkey { left: 2%; width: 94%; max-height: 100%; }
    .mp-crown { left: 12%; width: 60px; top: 0; }
    .mp-spark { font-size: 34px; right: 15%; top: 0; }
    .mp-formula { font-size: 15px; padding: 8px; border-width: 3px; box-shadow: var(--mp-shadow); }
    .mp-formula-first { top: 9%; right: 3%; }
    .mp-formula-second { display: none; }
    .mp-formula i { height: 3px; margin-top: 7px; }
    .mp-shape-lime { clip-path: polygon(0 0, 60% 0, 100% 11%, 80% 60%, 0 67%); }
    .mp-shape-orange { clip-path: polygon(34% 52%, 100% 33%, 100% 100%, 12% 100%); }
    .mp-checker-left { left: -62px; top: 30%; }
    .mp-checker-right { width: 90px; height: 70px; }
    .mp-login { padding: 26px 20px 32px; }
}
@media (prefers-reduced-motion: reduce) { .mp-start, .mp-nav a { transition: none; } }

/* Session debug and guest login: scoped to Math Pop. */
.mp-session-debug, .mp-session-debug * { box-sizing: border-box; }
.mp-session-debug { display:flex; flex-wrap:wrap; align-items:center; gap:5px 16px; padding: 8px 13px; margin-top: 8px; border: 1px dashed #737373; background: var(--mp-paper); color: #242424; font: 12px/1.45 monospace; overflow-wrap:anywhere; }
.mp-session-debug > strong { background: var(--mp-lime); border: 1px solid var(--mp-ink); padding: 2px 6px; }
.mp-guest-avatar { display:grid; place-items:center; padding:0; color:var(--mp-ink); font: 900 34px/1 Arial,sans-serif; background:var(--mp-lime); cursor:pointer; }
.mp-guest-avatar:hover { background:#ffb36b; }
html.mp-dialog-open { overflow: hidden; }
.mp-login-dialog, .mp-login-dialog * { box-sizing: border-box; }
.mp-login-dialog { position:fixed; inset:0; margin:auto; padding:0; width:min(690px, calc(100% - 32px)); max-width:none; max-height:calc(100% - 32px); max-height:calc(100dvh - 32px); overflow:auto; background:var(--mp-paper); color:var(--mp-ink); border:3px solid var(--mp-ink); border-radius:21px; box-shadow:7px 8px 0 var(--mp-ink); font-family:Arial, Helvetica, sans-serif; }
.mp-login-dialog::backdrop { background:rgba(255,255,255,.52); backdrop-filter:blur(8px); -webkit-backdrop-filter:blur(8px); }
.mp-login-layout { position:relative; display:grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); min-height:390px; isolation:isolate; overflow:hidden; }
.mp-login-close { position:absolute; z-index:4; top:12px; right:12px; display:grid; place-items:center; width:36px; height:36px; border:var(--mp-line); border-radius:50%; background:var(--mp-paper); color:var(--mp-ink); box-shadow:2px 3px 0 var(--mp-ink); cursor:pointer; padding:5px; }
.mp-login-close svg { width:100%; height:100%; }
.mp-login-close:hover { background:var(--mp-lime); }
.mp-login-form-side { position:relative; z-index:2; padding:36px 32px 32px; min-width:0; }
.mp-login-form-side h2 { margin:0 0 13px; color:var(--mp-ink); font:900 clamp(24px, 3.5vw, 36px)/1.08 'Arial Black',Arial,sans-serif; letter-spacing:-.045em; transform:rotate(-3deg); }
.mp-login-form-side h2 span { display:inline-block; padding:6px 9px; background:var(--mp-lime); border:var(--mp-line); box-shadow:4px 5px 0 var(--mp-ink); }
.mp-login-form-side p { font-size:15px; line-height:1.35; margin:0 0 22px; color:#333; font-weight:700; }
.mp-login-form-side form { display:grid; gap:8px; }
.mp-login-form-side label { font-size:14px; font-weight:800; margin-top:4px; }
.mp-login-form-side input { display:block; min-width:0; width:100%; padding:12px 13px; color:var(--mp-ink); background:#f8f8f6; border:var(--mp-line); border-radius:9px; font:inherit; font-size:16px; }
.mp-login-form-side input:focus { background:var(--mp-paper); outline:3px solid var(--mp-blue); outline-offset:2px; }
.mp-login-error { color:#a12121; font-size:13px; line-height:1.35; min-height:18px; overflow-wrap:anywhere; }
.mp-login-submit { display:flex; justify-content:space-between; align-items:center; gap:14px; color:var(--mp-paper); background:var(--mp-blue); border:var(--mp-line); border-radius:11px; box-shadow:4px 5px 0 var(--mp-ink); padding:13px 15px; font:900 19px/1 Arial,sans-serif; cursor:pointer; }
.mp-login-submit svg { width:22px; height:22px; flex:none; }
.mp-login-submit:hover { background:#3c4dcc; }
.mp-login-submit:disabled { opacity:.65; cursor:wait; }
.mp-login-submit:focus-visible, .mp-login-close:focus-visible { outline:3px solid var(--mp-blue); outline-offset:4px; }
.mp-login-art { position:relative; min-width:0; align-self:stretch; background:var(--mp-orange); border-left:var(--mp-line); overflow:hidden; }
.mp-login-art::before { content:""; position:absolute; inset:0; background:var(--mp-lime); clip-path:polygon(0 0,100% 0,100% 37%,0 66%); }
.mp-login-art::after { content:""; position:absolute; bottom:-11px; right:-8px; width:102px; height:66px; transform:rotate(-9deg); background:conic-gradient(var(--mp-ink) 25%,var(--mp-paper) 0 50%,var(--mp-ink) 0 75%,var(--mp-paper) 0) 0 0 / 30px 30px; z-index:0; }
.mp-login-art-caption { position:absolute; top:55px; left:13px; z-index:1; font:900 18px/1 'Arial Black',Arial,sans-serif; transform:rotate(-9deg); color:var(--mp-ink); padding:6px 8px; background:var(--mp-paper); border:var(--mp-line); box-shadow:3px 3px 0 var(--mp-ink); }
.mp-login-art-star { position:absolute; right:12px; top:98px; color:var(--mp-paper); font-size:45px; line-height:1; z-index:1; }
.mp-login-mascot { position:absolute; z-index:2; width:calc(100% + 24px); height:auto; bottom:0; right:-20px; overflow:visible; }
@media (max-width:640px) {
    .mp-session-debug { font-size:11px; gap:3px 9px; padding:5px 8px; }
    .mp-guest-avatar { font-size:26px; }
    .mp-login-dialog { width: min(390px, calc(100% - 24px)); border-radius:15px; box-shadow:4px 5px 0 var(--mp-ink); }
    .mp-login-layout { grid-template-columns:minmax(0,1fr); min-height:0; }
    .mp-login-form-side { padding:31px 20px 24px; }
    .mp-login-form-side h2 { padding-right:34px; }
    .mp-login-form-side p { margin-bottom:13px; }
    .mp-login-art { height:130px; border-left:0; border-top:var(--mp-line); }
    .mp-login-art-caption { top:27px; left:21px; }
    .mp-login-art-star { right:12px; top:12px; font-size:29px; }
    .mp-login-mascot { width:172px; right:5px; bottom:-27px; transform:rotate(18deg); }
}

/* Profile dropdown and persistent currency indicators. */
.mp-account { position:relative; flex:none; }
.mp-account-trigger { padding:0; background:#b9c9ff; cursor:pointer; }
.mp-account-trigger:hover, .mp-account-trigger[aria-expanded="true"] { box-shadow:var(--mp-shadow); }
.mp-account-panel { position:absolute; z-index:40; top:calc(100% + 13px); right:0; width:205px; padding:9px; background:var(--mp-paper); border:var(--mp-line); border-radius:14px; box-shadow:4px 5px 0 var(--mp-ink); }
.mp-account-panel[hidden] { display:none; }
.mp-account-panel a { display:block; padding:11px 12px; color:var(--mp-ink); font:700 15px/1.3 Arial,sans-serif; text-decoration:none; border-radius:7px; }
.mp-account-panel a:hover, .mp-account-panel a:focus-visible { background:#e9edff; }
.mp-account-panel hr { border:0; border-top:1px solid #c9c9c9; margin:7px 3px; }
.mp-account-panel .mp-account-logout { color:#b53d19; }
.mp-account-panel .mp-account-logout:hover { background:#fff1e9; }
.mp-wallet { display:flex; align-items:center; gap:15px; flex:none; }
.mp-wallet-currency { display:inline-flex; align-items:center; gap:6px; white-space:nowrap; font:900 20px/1 Arial,sans-serif; font-variant-numeric:tabular-nums; }
.mp-wallet-currency img { display:block; flex:none; width:32px; height:32px; object-fit:contain; }
.mp-wallet-coins { color:var(--mp-orange); }
.mp-wallet-tickets { color:#23863b; }
.mp-wallet-tickets img { width:34px; }
@media (min-width:1025px) and (max-width:1250px) {
    .mp-burger { display:grid; order:3; }
    .mp-nav { display:none; position:absolute; left:20px; right:20px; top:calc(100% - 2px); background:var(--mp-paper); padding:18px 24px; border:var(--mp-line); border-radius:0 0 16px 16px; box-shadow:0 6px 0 var(--mp-ink); z-index:40; }
    .mp-nav.is-open { display:flex; flex-direction:column; align-items:stretch; gap:2px; }
    .mp-nav a, .mp-nav .mp-mobile-profile { display:block; font-size:18px; padding:13px 3px; border-bottom-width:2px; }
}
@media (max-width:640px) {
    .mp-header-inner.has-wallet { flex-wrap:wrap; gap:6px; }
    .mp-header-inner.has-wallet .mp-logo-slot { flex:1 1 25px; width:auto; min-width:0; height:42px; }
    .mp-header-inner.has-wallet .mp-header-actions { gap:6px; margin-left:auto; }
    .mp-wallet { gap:8px; }
    .mp-wallet-currency { font-size:15px; gap:3px; }
    .mp-wallet-currency img { width:24px; height:25px; }
    .mp-wallet-tickets img { width:26px; }
    .mp-account-panel { width:190px; right:0; }
}
@media (max-width:365px) {
    .mp-header-inner.has-wallet .mp-logo-slot { flex-basis:0; }
    .mp-header-inner.has-wallet .mp-header-actions { gap:4px; }
    .mp-header-inner.has-wallet .mp-icon-button { width:34px; height:34px; padding:6px; }
    .mp-header-inner.has-wallet .mp-avatar { width:36px; height:36px; }
    .mp-wallet { gap:5px; }
    .mp-wallet-currency { font-size:14px; }
    .mp-wallet-currency img { width:22px; height:23px; }
}

/* Inline error reporting. */
.mp-report-error { display:inline; padding:0; border:0; background:transparent; color:inherit; font:inherit; font-weight:700; text-decoration:underline; text-underline-offset:2px; cursor:pointer; transition:color .15s,text-shadow .15s; }
.mp-report-error:hover, .mp-report-error:focus-visible { color:var(--mp-orange); text-shadow:0 0 7px #ffb36b; }
.mp-report-error:disabled { opacity:.6; cursor:wait; }
.mp-report-status { font-weight:400; }

/* Games navigation: shared across desktop and mobile. */
.mp-games-menu {position:relative;}
.mp-games-toggle {display:flex;align-items:center;gap:5px;color:var(--mp-ink);font:800 clamp(15px,1.4vw,21px)/normal Arial,sans-serif;white-space:nowrap;padding:14px 0 10px;border:0;border-bottom:4px solid #d0d0d0;background:transparent;cursor:pointer;}
.mp-games-toggle svg {width:15px;height:15px;}
.mp-games-toggle:hover,.mp-games-toggle[aria-expanded=true],.mp-games-toggle[aria-current=true] {color:#384ac5;border-color:var(--mp-blue);}
.mp-games-links {position:absolute;top:calc(100% + 9px);left:-15px;min-width:190px;background:var(--mp-paper);border:var(--mp-line);border-radius:12px;padding:7px;box-shadow:var(--mp-shadow);z-index:45;}
.mp-games-links[hidden] {display:none!important;}
.mp-nav .mp-games-links a {display:block;border:0;border-radius:6px;padding:11px 12px;font-size:16px;}
.mp-nav .mp-games-links a:hover,.mp-nav .mp-games-links a[aria-current=page] {background:var(--mp-lime);color:var(--mp-ink);}
@media(max-width:1250px){.mp-games-toggle{width:100%;justify-content:space-between;font-size:18px;padding:13px 3px;border-bottom-width:2px;}.mp-games-links{position:static;box-shadow:none;border:0;border-left:var(--mp-line);border-radius:0;margin:6px 0 6px 12px;padding:0 6px;}}

/* Shared circular avatar for account navigation and student rosters. */
.mp-avatar.has-personal-color,.mp-account-trigger{position:relative;isolation:isolate}
.mp-avatar .mp-avatar-placeholder,.mp-avatar .mp-avatar-photo{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:cover;pointer-events:none}
.mp-avatar .mp-avatar-photo{z-index:1}
.mp-avatar.has-personal-color::after{content:"";position:absolute;inset:0;z-index:2;border:var(--mp-avatar-ring,var(--mp-avatar-default-ring,3.4px)) solid var(--mp-account-color,var(--mp-lime));border-radius:50%;pointer-events:none;box-sizing:border-box}
@media(max-width:620px){.mp-avatar.has-personal-color{--mp-avatar-default-ring:2.55px}}

.mp-nav .mp-games-links .mp-games-unavailable{appearance:none;display:block;width:100%;padding:11px 12px;border:0;border-radius:6px;background:transparent;color:#92939b;text-align:left;font:inherit;font-size:16px;cursor:pointer}
.mp-nav .mp-games-links .mp-games-unavailable:hover,.mp-nav .mp-games-links .mp-games-unavailable:focus-visible{background:#f0f0f3;color:#757680}

/* Guest navigation: direct links at every viewport, independent of the authenticated menu. */
.mp-header-inner.is-guest .mp-burger { display:none; }
.mp-header-inner.is-guest .mp-logo-slot { display:flex; align-items:center; flex:0 0 auto; width:auto; min-width:110px; height:auto; }
.mp-guest-wordmark { color:var(--mp-ink); font-family:var(--mp-display-font); font-weight:900; font-size:clamp(20px,2.4vw,32px); line-height:1; letter-spacing:-.06em; white-space:nowrap; }
.mp-header-inner.is-guest .mp-nav { display:flex; position:static; flex:1 1 auto; flex-direction:row; align-items:center; justify-content:center; gap:clamp(10px,2.2vw,37px); padding:0; border:0; border-radius:0; box-shadow:none; background:transparent; min-width:0; }
.mp-header-inner.is-guest .mp-nav a,.mp-header-inner.is-guest .mp-guest-streams { font:800 clamp(13px,1.4vw,21px)/1.2 Arial,Helvetica,sans-serif; padding:14px 0 10px; white-space:nowrap; border-bottom:4px solid #d0d0d0; }
.mp-header-inner.is-guest .mp-nav a:hover,.mp-header-inner.is-guest .mp-nav a:focus-visible,.mp-header-inner.is-guest .mp-nav a[aria-current=page] { border-color:var(--mp-blue); }
.mp-header-inner.is-guest .mp-guest-streams { appearance:none; border:0; border-bottom:4px solid #e6e6e8; color:#92939b; background:transparent; cursor:pointer; font-weight:400; }
@media(max-width:740px) {
    .mp-header-inner.is-guest { flex-wrap:wrap; }
    .mp-header-inner.is-guest .mp-nav { order:4; flex:1 0 100%; justify-content:space-between; gap:4px; }
    .mp-header-inner.is-guest .mp-nav a,.mp-header-inner.is-guest .mp-guest-streams { font-size:clamp(11px,3.5vw,16px); padding:9px 0 7px; border-bottom-width:2px; }
}

/* Shared circular identity component, size set by the surrounding interface. */
.mp-person-avatar.mp-avatar{box-sizing:border-box;flex:none;position:relative;display:inline-block;vertical-align:middle;background:var(--mp-teacher-tint,#eee);border-width:1.7px}
.mp-person-inline{display:inline-flex;align-items:center;gap:7px;min-width:0;max-width:100%;vertical-align:middle}
.mp-person-inline>.mp-person-avatar{--mp-avatar-size:30px;width:var(--mp-avatar-size);height:var(--mp-avatar-size);--mp-avatar-ring:2.55px;box-shadow:1px 2px 0 var(--mp-ink)}
.mp-person-inline>span:not(.mp-person-avatar){min-width:0;overflow-wrap:anywhere}

.mp-nav .mp-library-pending-dot{display:inline-block;width:9px;height:9px;margin-left:6px;vertical-align:middle;border-radius:50%;background:#df2929;box-shadow:0 0 0 2px #fff;flex:none}

/* Site-wide layout contract. The lesson canvas is the sole full-screen header exception. */
html.mp-site-layout{scrollbar-gutter:stable}
html.mp-site-layout>body{margin:0;min-width:0;font-family:var(--mp-font);color:var(--mp-ink)}
.mp-page-title,:where(html.mp-site-layout main h1){font:var(--mp-h1);letter-spacing:-.04em;margin:0;color:var(--mp-ink);overflow-wrap:anywhere}
.mp-section-title,:where(html.mp-site-layout main h2){font:var(--mp-h2);margin:0;color:var(--mp-ink)}
.mp-subsection-title,:where(html.mp-site-layout main h3){font:var(--mp-h3);margin:0;color:var(--mp-ink)}
.mp-page-content{margin-top:var(--mp-page-spacing)}
.mp-page-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;min-width:0;margin-bottom:16px}
.mp-header .mp-logo-slot{display:flex;align-items:center;justify-content:flex-start;min-width:0}
.mp-header .mp-brand-logo{display:block;width:100%;height:100%;object-fit:contain;object-position:left center;max-height:65px}
.mp-header .mp-guest-wordmark{font-size:clamp(15px,2vw,26px)}
.mp-lesson-header .mp-brand-logo{max-height:40px}
.mp-lesson-header .mp-board-wordmark{font-size:16px}
.mp-site-header{flex:none}
.mp-site-header .mp-header-inner{position:relative}
.mp-site-header .mp-header-inner.is-guest{flex-wrap:wrap}
.mp-site-header .mp-header-inner.is-guest .mp-logo-slot{width:160px;height:65px;flex:0 0 160px;min-width:0}
.mp-site-header .mp-header-inner.is-guest .mp-nav{flex-wrap:wrap}
@media(max-width:1024px){.mp-site-header .mp-header-inner.is-guest .mp-logo-slot{width:145px;height:48px;flex-basis:145px}}
@media(max-width:640px){.mp-site-header .mp-header-inner.is-guest .mp-logo-slot{height:42px}}
.mp-site-header .mp-header-actions>*{flex-shrink:0}
.mp-site-header .mp-nav.is-open> *{flex-shrink:0}
.mp-site-header .mp-nav.is-open{max-height:min(65dvh,max(0px,calc(100dvh - var(--mp-header-bottom,100px) - 8px)));overflow-y:auto;overscroll-behavior:contain}
@media(min-width:1251px){
 .mp-site-header .mp-header-inner{gap:16px;padding-inline:20px;flex-wrap:wrap}
 .mp-site-header .mp-logo-slot{width:160px;flex:0 0 160px}
 .mp-site-header .mp-nav{gap:16px;flex:1 1 auto;min-width:0;flex-wrap:wrap;row-gap:2px}
 .mp-site-header .mp-nav>a,.mp-site-header .mp-games-toggle{font-size:clamp(15px,1.3vw,19px)}
 .mp-site-header .mp-header-actions{gap:12px}
 .mp-site-header .mp-header-inner:has(.mp-lesson-countdown:not([hidden])){gap:12px}
}
/* If unusual balance lengths or additional controls leave too little room, preserve every link in the burger. */
.mp-site-header .mp-header-inner.is-compact .mp-burger{display:grid;order:3;flex:none}
.mp-site-header .mp-header-inner.is-compact .mp-nav{display:none;position:absolute;left:0;right:0;top:calc(100% - 2px);background:var(--mp-paper);padding:16px 24px;border:var(--mp-line);border-radius:0 0 16px 16px;box-shadow:0 6px 0 var(--mp-ink);z-index:40}
.mp-site-header .mp-header-inner.is-compact .mp-nav.is-open{display:flex;flex-direction:column;align-items:stretch;gap:2px}
.mp-site-header .mp-header-inner.is-compact .mp-nav>a,.mp-site-header .mp-header-inner.is-compact .mp-mobile-profile,.mp-site-header .mp-header-inner.is-compact .mp-games-toggle{display:flex;font-size:18px;padding:13px 3px;border-bottom-width:2px}
.mp-site-header .mp-header-inner.is-compact .mp-games-toggle{width:100%;justify-content:space-between}
.mp-site-header .mp-header-inner.is-compact .mp-games-links{position:static;box-shadow:none;border:0;border-left:var(--mp-line);margin:6px 0 6px 12px;padding:0 6px;min-width:0}
@media(max-width:1250px){.mp-site-header .mp-nav{left:0;right:0}.mp-site-header .mp-nav.is-open .mp-games-links{min-width:0}}
@media(max-width:1024px){.mp-site-header .mp-brand-logo{max-height:48px}}
@media(max-width:740px){:root{--mp-page-spacing:16px}}
@media(max-width:640px){
 .mp-site-header .mp-brand-logo{max-height:42px}
 .mp-site-header .mp-header-inner.has-wallet .mp-logo-slot{min-width:55px;flex-basis:55px}
 .mp-site-header .mp-header-inner.has-wallet .mp-header-actions{flex-wrap:wrap;min-width:0;max-width:100%;justify-content:flex-end}
 .mp-site-header .mp-nav.is-open{padding:10px 16px}
 .mp-site-header .mp-header-inner.is-guest .mp-logo-slot{width:110px;flex:0 0 110px}
 .mp-site-header .mp-header-inner.is-guest .mp-nav{min-width:0;flex-wrap:wrap}
}

/* Shared comic card and paper/brush sticker. Feature styles only arrange their contents. */
.mp-comic-card{background:var(--mp-paper);border:var(--mp-line);border-radius:12px;box-shadow:var(--mp-shadow);min-width:0}
.mp-brush-tag{position:relative;display:inline-flex;align-items:center;justify-content:center;isolation:isolate;padding:8px 13px;color:var(--mp-ink);font:800 12px/1.2 var(--mp-font);white-space:nowrap;transform:rotate(-3deg);filter:drop-shadow(1px 0 0 #85858b) drop-shadow(-1px 0 0 #85858b) drop-shadow(0 1px 0 #85858b) drop-shadow(0 -1px 0 #85858b)}
.mp-brush-tag::before{content:"";position:absolute;inset:0;z-index:-1;background:var(--mp-brush-fill,var(--mp-paper));clip-path:polygon(3% 15%,14% 12%,10% 5%,32% 9%,46% 0,58% 7%,78% 3%,95% 11%,91% 23%,100% 31%,95% 44%,99% 54%,92% 67%,97% 83%,83% 86%,88% 94%,65% 91%,51% 100%,36% 93%,17% 97%,20% 87%,2% 83%,7% 66%,0 58%,6% 44%,1% 31%);pointer-events:none}
@media(forced-colors:active){.mp-brush-tag{filter:none;transform:none;border:1px solid ButtonText}.mp-brush-tag::before{clip-path:none;background:ButtonFace}}
