/* Header controls and the public WhatsApp pill, shared with the home page. */
.nav-auth { display: flex; align-items: center; gap: 8px; }
button.nav-btn,
a.nav-btn,
.nihao-public-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    min-height: 38px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background: #fff;
    color: #002933;
    font-family: "Noto Sans HK", "PingFang HK", "PingFang TC", "Microsoft JhengHei", sans-serif;
    font-size: .76rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}
.nav-btn.login,
a.nav-btn.login,
.nihao-public-nav-btn.login {
    background: #fff;
    color: #002933;
    border: 1px solid rgba(0, 41, 51, .16);
}
.nav-btn.login:hover,
a.nav-btn.login:hover,
.nihao-public-nav-btn.login:hover { background: #f5faf9; }
.nav-btn.register,
a.nav-btn.register,
.nihao-public-nav-btn.register {
    background: #1c2b2e;
    color: #fff;
    border: 0;
    box-shadow: 0 14px 28px -18px rgba(0, 41, 51, .8);
}
.nav-btn.register:hover,
a.nav-btn.register:hover,
.nihao-public-nav-btn.register:hover {
    transform: translateY(-2px);
    background: #124e48;
    color: #fff;
}
@media (max-width: 780px) {
    .nav-auth { gap: 6px; }
    button.nav-btn,
    a.nav-btn,
    .nihao-public-nav-btn,
    .nav-btn.nihao-public-nav-btn {
        min-height: 36px;
        padding: 0 14px;
    }
}

.whatsapp-float {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 70;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-sizing: border-box;
    min-height: 48px;
    padding: 0 20px;
    border: 0;
    border-radius: 999px;
    background: #1f9d55;
    color: #fff;
    box-shadow: 0 24px 48px -20px rgba(0, 41, 51, .35);
    font-family: "Noto Sans HK", "PingFang HK", "PingFang TC", "Microsoft JhengHei", sans-serif;
    font-size: 14.5px;
    font-weight: 800;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    transition: transform .2s ease, background .2s ease;
}
.whatsapp-float svg { width: 18px; height: 18px; flex: none; }
.whatsapp-float:hover { transform: translateY(-2px); background: #168456; }
@media (max-width: 780px) {
    .whatsapp-float {
        right: 14px;
        bottom: calc(14px + env(safe-area-inset-bottom));
        min-height: 46px;
        padding: 0 16px;
        font-size: 13.5px;
    }
    body.teacher-authed #teacherHelpFloat {
        bottom: calc(72px + env(safe-area-inset-bottom));
    }
}

#teacherPublicHeader { background: #fff; border-bottom: 3px solid #83D7CA; }
#teacherPublicHeader .nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: min(1120px, calc(100% - 80px));
    margin: auto;
    padding: 16px 0 14px;
}
#teacherPublicHeader .brand { display: flex; align-items: center; gap: 11px; color: #002933; text-decoration: none; }
#teacherPublicHeader .brand img { width: 88px; height: auto; }
#teacherPublicHeader .brand span { font-size: .72rem; font-weight: 800; letter-spacing: .12em; }
body.teacher-authed #teacherPublicHeader,
body.teacher-authed #whatsappFloat,
body.teacher-authed #backToTop,
body.teacher-authed #nihaoHelp { display: none !important; }
body:not(.teacher-authed) #teacherPublicHeader + main.shell { padding-bottom: 88px; }
#teacherHelpFloat {
    right: 24px;
    bottom: 88px;
    z-index: 70;
}
@media (max-width: 780px) {
    #teacherPublicHeader .nav { width: min(100% - 28px, 620px); padding: 12px 0 10px; }
    #teacherPublicHeader .brand span { display: none; }
    #teacherHelpFloat { right: 14px; bottom: calc(72px + env(safe-area-inset-bottom)); }
}
