:root{font-family:Inter,'Segoe UI',sans-serif;color:#17233d;background:#f4f6fb}*{box-sizing:border-box}body{margin:0}main{max-width:620px;margin:8vh auto;padding:24px}header{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:28px}header strong{font-size:32px;color:#2b53dc}header span{font-size:12px;font-weight:700;color:#64718a}section{background:white;border:1px solid #e1e6f0;border-radius:12px;padding:28px}h1{font-size:24px;margin-top:0}p,footer{line-height:1.6}label{display:grid;gap:7px;margin:18px 0}input,button{font:inherit;border:1px solid #cbd4e4;border-radius:7px;padding:12px;width:100%}button{cursor:pointer;background:#2b53dc;color:white;border:0;margin:8px 0}button.secondary{background:#edf1fc;color:#20396c}button:disabled{opacity:.6}input:focus-visible,button:focus-visible{outline:3px solid #5479ff;outline-offset:2px}.error{color:#9c2834}footer{font-size:13px;color:#64718a;margin-top:20px}.space{padding:14px;background:#f4f6fb;border-radius:8px;overflow-wrap:anywhere}@media(max-width:500px){main{margin:18px auto;padding:16px}section{padding:20px}}

main.academic-open{max-width:none;margin:0;padding:12px}main.academic-open header{margin-bottom:8px}main.academic-open section{padding:10px}#academic-frame{width:100%;height:82vh;border:0}.access-bar{display:flex;gap:16px;align-items:center}.access-bar label{flex:1;margin:0}.access-bar select{font:inherit;padding:8px;width:100%}.access-bar button{width:auto}.development-note{font-size:12px;margin:8px 0}


#manual-sync{margin:8px 12px;padding:12px}#manual-sync h2{font-size:16px;margin:0 0 8px}.sync-summary{display:flex;flex-wrap:wrap;gap:8px 24px;font-size:13px}.sync-buttons{display:flex;gap:10px}.sync-buttons button{width:auto}#manual-sync p{margin:6px 0;font-size:13px}#sync-check-b{width:auto}#sync-verification{font-size:12px;white-space:pre-wrap}#manual-sync details{font-size:12px;color:#64718a}

[hidden]{display:none!important}.account-screen{max-width:430px;margin:auto}.account-screen h1{margin-bottom:12px}.account-message:empty{display:none}.account-links p{margin-bottom:0}.account-profile{display:grid;gap:4px;min-width:0;flex:1}.account-profile strong,.account-profile small{overflow-wrap:anywhere}.account-profile small{color:#64718a}.account-screen input:disabled{background:#f4f6fb}.access-bar #space-choice-label{flex:1}

/* 12K-2A: let the authenticated shell allocate the available viewport. */
main.academic-open{width:100%;min-width:0;min-height:100vh;min-height:100dvh;height:100vh;height:100dvh;display:grid;grid-template-rows:auto minmax(0,1fr) auto auto;gap:8px}
main.academic-open>header{margin:0;min-width:0;flex-wrap:wrap}
main.academic-open>#auth-root{min-width:0;min-height:0;display:grid;grid-template-rows:auto auto minmax(0,1fr);padding:10px}
main.academic-open #academic-host{min-width:0;min-height:0}
main.academic-open #academic-frame{display:block;width:100%;height:100%;min-height:0;border:0}
main.academic-open #access-mode{margin:6px 0;font-size:12px}
main.academic-open #manual-sync{margin:0;padding:8px 12px;min-width:0}
main.academic-open #manual-sync>h2{margin:0 0 4px}
main.academic-open #manual-sync>button{display:inline-block;width:auto;margin:4px 4px 4px 0;padding:8px 12px}
main.academic-open>footer{margin:0}
main.academic-open .access-bar{flex-wrap:wrap;gap:8px}
main.academic-open .access-bar button{margin:0;padding:8px 12px}
@media(max-width:760px){main.academic-open{padding:8px;gap:6px}main.academic-open>#auth-root{padding:6px}.access-bar .account-profile{flex-basis:50%}main.academic-open>header strong{font-size:26px}}

main.academic-open #manual-sync{display:flex;flex-wrap:wrap;align-items:center;gap:4px 16px}
main.academic-open #manual-sync>h2{flex-basis:100%}
main.academic-open #manual-sync>p{margin:0}
main.academic-open #manual-sync>#sync-message,main.academic-open #manual-sync>details,main.academic-open #manual-sync>#conflict-review{flex-basis:100%}
main.academic-open #manual-sync>p:empty{display:none}

main.academic-open #manual-sync>h2{flex-basis:auto;margin:0;font-size:14px}
main.academic-open #manual-sync>button{margin:0}
main.academic-open #manual-sync>#sync-history{order:1;flex-basis:100%;font-size:11px}
main.academic-open #manual-sync>#sync-message{flex-basis:auto;font-size:12px}
main.academic-open #manual-sync>details{flex-basis:auto;margin-top:0!important}
main.academic-open>footer{display:none}
