/* The existing buttons keep their event handlers and notification counters. */
header.portalHeader > .portalActions{display:flex;flex-wrap:nowrap;align-items:center;gap:8px;grid-column:1/-1;min-width:0;width:100%;overflow-x:auto;overscroll-behavior-inline:contain;padding:2px 0 7px;scrollbar-width:thin}
header.portalHeader > .portalActions > button{flex:0 0 auto;white-space:nowrap;min-height:44px;margin:0;position:static;max-width:none;width:auto}
header.portalHeader > .portalActions > [hidden]{display:none!important}
.noteGame{--ng-ink:#243d34;--ng-green:#216846;border:1px solid #bbcdbb;border-radius:22px;width:min(660px,calc(100vw - 24px));max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px);padding:0;color:var(--ng-ink);background:#fafbf5;box-sizing:border-box;overflow:auto;box-shadow:0 20px 90px #152d3740;font-family:system-ui,sans-serif}
.noteGame::backdrop{background:#142c32a8;backdrop-filter:blur(4px)}
.noteGame *{box-sizing:border-box}.noteGame button{font:inherit;cursor:pointer;border:1px solid #b9cdbf;background:#fff;color:var(--ng-ink);border-radius:12px;padding:10px 16px;min-height:44px}
.noteGame button:focus-visible{outline:3px solid #eea32b;outline-offset:3px}.noteGame button:disabled{cursor:default;opacity:1}
.ngTop{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:12px;background:#eef3e8;padding:14px 20px;border-bottom:1px solid #d7e1d1}.ngTop h2{margin:0;font-size:21px}.ngTop .ngClose{padding:8px 12px;font-size:14px}
.ngBody{padding:20px 26px 26px}.ngIntro{font-size:18px;line-height:1.6;margin:0 0 22px}.ngChoices,.ngTempos{border:0;padding:0;margin:0 0 24px;display:flex;gap:10px;flex-wrap:wrap}.ngChoices legend,.ngTempos legend{font-weight:700;padding:0;margin-bottom:12px}.ngChoices button{flex:1}.noteGame button[aria-pressed=true]{background:#e0eee1;border:2px solid #306849;padding:9px 15px;box-shadow:0 0 0 2px #30684915}
.ngTempos button{flex:1;min-width:170px;display:flex;align-items:center;flex-direction:column;gap:5px;text-align:center}.ngTempos button>span:last-child{font-size:14px}.ngMascot{display:block;position:relative;width:100px;height:90px;overflow:hidden}.ngTempoMascot{width:85px;height:85px;object-fit:contain}.ngMotion{position:absolute;right:0;bottom:22px;font-size:29px;font-weight:800;color:#8b631d}.ngSlow .ngMotion{font-size:20px;transform:rotate(-12deg)}.ngFast .ngMotion{font-size:42px;color:#267654}
.noteGame .ngPrimary{display:block;width:100%;margin-top:14px;background:var(--ng-green);color:white;border-color:var(--ng-green);font-weight:700;padding:14px 18px}.ngMeta{display:flex;gap:12px;justify-content:space-between;font-size:14px}.ngMeta>span:last-child{font-variant-numeric:tabular-nums}.noteGame progress{appearance:none;width:100%;height:6px;border:0;border-radius:6px;display:block;margin-top:12px;background:#e3e9dd}.noteGame progress::-webkit-progress-bar{background:#e3e9dd;border-radius:6px}.noteGame progress::-webkit-progress-value{background:#45815a;border-radius:6px}.noteGame progress::-moz-progress-bar{background:#45815a;border-radius:6px}
.ngNote{display:block;width:min(290px,100%);height:auto;aspect-ratio:1;margin:0 auto;background:white;border-radius:14px}.ngBody h3{text-align:center;margin:0 0 16px;font-size:20px}.ngAnswers{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:9px}.noteGame .ngAnswer{font-size:25px;font-weight:600;padding:12px 4px;min-height:60px}.ngFeedback{text-align:center;font-weight:650;min-height:30px;margin:16px 0 0;padding:8px;border-radius:9px}.noteGame .ngCorrect{background:#d8f1df;color:#15532b;border-color:#2f9b51}.noteGame .ngWrong{background:#ffe0de;color:#8a2421;border-color:#c24943}.ngResult{text-align:center}.ngAward{width:220px;max-width:70%;height:auto}.ngResult h3{margin:10px 0}.ngScore{font-size:32px;font-weight:750;margin:12px}.ngResult>button:last-child{margin-top:12px;width:100%}
@media(max-width:480px){header.portalHeader>.portalActions{gap:6px}header.portalHeader>.portalActions>button{font-size:13px;padding:8px 10px}.ngTop{padding:12px}.ngTop h2{font-size:18px}.ngBody{padding:16px 14px 20px}.ngIntro{font-size:16px}.ngChoices{gap:6px}.ngChoices button{font-size:13px;padding:10px 6px}.ngChoices button[aria-pressed=true]{padding:9px 5px}.ngTempos{gap:8px}.ngTempos button{min-width:0;padding:10px 6px}.ngTempos button[aria-pressed=true]{padding:9px 5px}.ngTempos strong{font-size:14px}.ngTempos button>span:last-child{font-size:12px}.ngNote{width:min(245px,100%)}.ngAnswers{gap:6px}.noteGame .ngAnswer{font-size:23px;min-height:55px}.ngMeta{font-size:12px;gap:6px}}
@media(max-height:700px){.ngNote{width:min(220px,100%)}.ngBody{padding-top:12px}.ngFeedback{margin-top:10px}.ngAward{width:170px}}

.ngChoices button{flex:1 1 110px}.ngCustom[hidden],.ngCustom [hidden],.ngSaveLine [hidden]{display:none!important}
.ngCustom{margin:-6px 0 20px}.ngHint,.ngSelectionCount,.ngSaveStatus{font-size:14px;line-height:1.5;margin:8px 0 14px;color:#456050}
.ngNoteGroup{border:1px solid #c2d2bd;border-radius:14px;padding:12px;margin:14px 0;background:#f2f6ec;min-width:0}
.ngNoteGroup legend{font-weight:700;padding:0 6px}.ngNoteGroup legend label{display:flex;gap:10px;align-items:center;min-height:44px;cursor:pointer}
.ngCustom input{appearance:auto;width:20px;height:20px;margin:0;accent-color:#216846;flex-shrink:0}.ngCustom input:focus-visible{outline:3px solid #eea32b;outline-offset:3px}
.ngNoteTools{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px}.ngNoteTools button{font-size:13px;padding:6px 10px}
.ngNoteGrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(76px,1fr));gap:8px}
.ngNoteOption{position:relative;background:#fff;border:1px solid #c8d5c5;border-radius:10px;display:flex;align-items:center;flex-direction:column;padding:6px;cursor:pointer;min-width:0}
.ngNoteOption:has(input:checked){border-color:#2e7552;background:#e5f2df;box-shadow:inset 0 0 0 1px #2e7552}
.ngNoteOption input{align-self:flex-start}.ngNoteThumb{width:100%;height:auto;aspect-ratio:1;display:block;border-radius:5px}.ngNoteOption strong{font-size:17px;margin-top:3px}
.ngSaveLine{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:12px}.ngSaveLine .ngSaveStatus{flex:1;min-width:190px;margin:0}.ngSaveLine button{font-size:13px;padding:6px 10px}
.noteGame .ngStart:disabled{opacity:.5;cursor:not-allowed}.ngAnswers{grid-template-columns:repeat(var(--ng-answers,5),minmax(0,1fr))}
@media(max-width:480px){.ngNoteGrid{grid-template-columns:repeat(auto-fill,minmax(66px,1fr))}.ngChoices button{flex-basis:40%}}
