.member-dialog{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans KR","Malgun Gothic",sans-serif;width:min(94vw,620px);max-height:88dvh;border-color:#6ce4c480;background:#141f30;overscroll-behavior:contain}.member-dialog h2{margin:0 0 18px;font-size:23px}.member-dialog .member-head{display:flex;justify-content:space-between;align-items:center;gap:16px}.member-dialog .close{flex:none;min-width:44px;min-height:44px;padding:6px;font-size:22px}.member-dialog label{display:block;margin-top:12px}.member-dialog input{min-height:46px;margin:6px 0}.member-dialog .guide{font-size:13px;color:#9cacc1;margin:0 0 8px}.member-dialog .check{font-size:14px;min-height:24px;color:#aebfd4}.member-dialog .check.good{color:#6ce4c4}.member-dialog .check.bad,.member-dialog .danger{color:#ff8898}.member-dialog .status{min-height:26px;overflow-wrap:anywhere}.member-dialog .links{display:flex;gap:8px;flex-wrap:wrap;margin-top:18px}.member-dialog button{min-height:44px;line-height:1.4;flex-shrink:0}.member-dialog button:disabled{opacity:.55}.member-dialog .actions{margin-top:20px}.member-dialog .profile-row,.member-dialog .member-row{padding:14px 0;border-bottom:1px solid #29384c;overflow-wrap:anywhere}.member-dialog .chat-list{height:min(46dvh,430px);overflow:auto;display:flex;flex-direction:column;gap:12px;padding:12px 0}.member-dialog .message{align-self:flex-start;width:min(88%,420px);background:#1c2c42;border-radius:14px;padding:10px 14px;white-space:pre-wrap;overflow-wrap:anywhere}.member-dialog .message.mine{align-self:flex-end;background:#19443e}.member-dialog .message small{display:block;color:#a8c7c0;font-size:12px;margin-bottom:5px}.member-dialog .compose{display:flex;gap:10px;align-items:end;position:sticky;bottom:0;background:#141f30}.member-dialog .compose textarea{flex:1;min-width:0;max-height:120px;min-height:46px;background:#081b29;border:1px solid #548d83;color:white;border-radius:10px;padding:10px;font:inherit;resize:vertical}.member-dialog .compose button{padding:12px 18px}.member-bar{display:flex;gap:8px;align-items:center;justify-content:flex-end;flex-wrap:wrap}.member-bar button{border:1px solid #6ce4c460;background:#162c36;color:#f3f7fc;border-radius:10px;padding:9px 12px;min-height:42px;font:inherit;cursor:pointer}.member-greeting{color:#bce8dc;font-size:13px;text-align:right;margin:0}.member-bar-wrap{max-width:55%}@media(max-width:600px){.member-bar-wrap{max-width:100%;width:100%}.member-bar{gap:6px}.member-bar button{padding:8px 10px;min-height:40px;font-size:14px}.member-greeting{margin-top:4px}.member-dialog{padding:18px}.member-dialog .actions button{min-width:80px}}

.top:has(.member-bar-wrap){flex-wrap:wrap}@media(max-width:600px){.member-bar-wrap{flex:1 1 auto;width:auto;max-width:100%}}

.member-dialog .links{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin-top:16px}
.member-dialog .links button{width:100%;min-width:0;min-height:52px;margin:0;padding:10px 6px;font:inherit;line-height:1.35}
.member-dialog.member-signup{padding:20px 24px}
.member-dialog.member-signup h2{margin:0;font-size:23px}
.member-dialog.member-signup .member-head{margin-bottom:8px}
.member-dialog.member-signup .signup-warning{margin:0 0 10px;padding:9px 12px;border-left:3px solid #ffca75;border-radius:7px;background:#ffca7510;color:#ffdc9c;font-size:14px;line-height:1.4}
.member-dialog.member-signup label{margin-top:6px}
.member-dialog.member-signup input{min-height:40px;margin:3px 0;padding:8px 10px}
.member-dialog.member-signup .guide{font-size:13px;line-height:1.3;margin:2px 0 4px}
.member-dialog.member-signup .check{min-height:0;line-height:1.3;margin:2px 0 4px;font-size:13px}
.member-dialog.member-signup .check:empty{display:none}
.member-dialog.member-signup .actions{margin-top:12px}
.member-dialog.member-signup .status:empty{display:none}
@media(max-width:600px){.member-dialog.member-signup{padding:14px 16px}.member-dialog .links{gap:7px}.member-dialog .links button{min-height:52px;padding:9px 4px}}

@media(max-width:600px){.member-dialog.member-signup{max-height:calc(100dvh - 24px);padding:12px 14px}.member-dialog.member-signup label{margin-top:4px}.member-dialog.member-signup .signup-warning{padding:6px 9px;margin-bottom:6px}.member-dialog.member-signup .member-head{margin-bottom:6px}}

.member-dialog.member-signup label{line-height:1.25}.member-dialog.member-signup input{display:block;margin:2px 0;padding:6px 10px}

.member-dialog .links{margin-top:28px;padding-top:16px;border-top:1px solid #6ce4c430;align-items:stretch}.member-dialog .links button{align-self:stretch}
.member-dialog .compose{align-items:stretch;gap:10px;position:static}.member-dialog .compose textarea{margin:0;max-height:160px;line-height:1.4;box-sizing:border-box}.member-dialog .compose button{margin:0;align-self:stretch;min-width:72px;display:flex;align-items:center;justify-content:center}

.member-dialog .signup-warning{color:#ffdc9c;background:#ffca7510;border-left:3px solid #ffca75;padding:10px 12px;border-radius:7px;line-height:1.4}.member-dialog.member-recovery label{margin-top:10px}.member-dialog.member-recovery input{margin:4px 0}

.member-greeting{position:relative;top:6px}
.member-dialog [data-info]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:4px}
.member-dialog [data-info] .profile-row{display:flex;flex-direction:column;gap:7px;min-width:0;padding:14px 16px;border:1px solid #6ce4c430;border-radius:12px;background:#1c2c42}
.member-dialog .profile-label{color:#aebfd4;font-size:13px;line-height:1.4}
.member-dialog .profile-value{color:#f3f7fc;font-weight:600;line-height:1.5;overflow-wrap:anywhere}
@media(max-width:600px){.member-dialog [data-info]{grid-template-columns:minmax(0,1fr);gap:8px}.member-dialog [data-info] .profile-row{padding:12px 14px;gap:5px}}

.member-dialog.member-chat{height:min(78dvh,660px);box-sizing:border-box}
.member-dialog.member-chat[open]{display:flex;flex-direction:column}
.member-dialog.member-chat .member-head{flex:none}
.member-dialog.member-chat .member-head > .close{transform:translateY(-5px)}
.member-dialog.member-chat .chat-list{height:auto;flex:1;min-height:0;margin-bottom:12px}
.member-dialog.member-chat .compose{flex:none;margin-top:auto}
.member-dialog.member-chat .compose textarea{height:calc(1.4em + 22px);min-height:calc(1.4em + 22px);max-height:calc(4.2em + 22px);resize:none;overflow-y:auto}
.member-dialog.member-chat .status:empty{display:none}
.member-dialog.member-chat .status{flex:none;margin:8px 0 0}

.member-dialog.member-confirm{width:min(92vw,460px);padding:26px;box-sizing:border-box}
.member-dialog.member-confirm .confirm-copy{margin:0;color:#f3f7fc;font-size:16px;font-weight:500;line-height:1.75;word-break:keep-all;overflow-wrap:anywhere}
.member-dialog.member-confirm .actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-top:24px}
.member-dialog.member-confirm .actions button{width:100%;min-width:0;min-height:48px;margin:0;box-sizing:border-box;font:inherit;font-weight:600;padding:11px 16px;border-radius:10px}
.member-dialog.member-confirm .actions button:last-child{background:#1c2c42;border-color:#6ce4c450;color:#f3f7fc}
@media(max-width:600px){.member-dialog.member-confirm{padding:22px}.member-dialog.member-confirm .actions{gap:10px;margin-top:20px}}

.member-dialog .actions{display:flex;justify-content:center;align-items:stretch;gap:12px}.member-dialog .actions button{flex:1 1 0;min-width:0;margin:0;box-sizing:border-box;text-align:center}

.member-dialog .status:empty{display:none}.member-dialog .status{margin-bottom:0}.member-dialog .actions:last-child{margin-bottom:0}
.member-dialog .member-account-card{display:grid;grid-template-columns:repeat(4,minmax(0,1fr)) 40px;gap:10px;padding:14px 12px;margin-top:10px;border:1px solid #6ce4c430;border-radius:12px;background:#1c2c42;align-items:center}
.member-account-field{display:flex;flex-direction:column;gap:6px;min-width:0}.member-account-field small{color:#aebfd4;font-size:12px}.member-account-field span{color:#f3f7fc;overflow-wrap:anywhere;line-height:1.4}.member-dialog .member-delete{min-width:36px;min-height:36px;padding:0;background:#ff52621a;border-color:#ff889850;font-size:24px;color:#ff8898;grid-column:5}
@media(max-width:600px){.member-dialog .member-account-card{grid-template-columns:repeat(2,minmax(0,1fr)) 36px}.member-dialog .member-delete{grid-column:3;grid-row:1 / span 2}.member-account-field:nth-child(3){grid-column:1}.member-account-field:nth-child(4){grid-column:2}}

.member-dialog{font-family:"Apple SD Gothic Neo",-apple-system,BlinkMacSystemFont,"Segoe UI","Noto Sans KR","Malgun Gothic",sans-serif}.member-dialog h2{font-weight:750;letter-spacing:-.02em;line-height:1.45}.member-dialog>p:not(.status){font-size:17px;font-weight:600;line-height:1.75;color:#eef7ff;word-break:keep-all;overflow-wrap:anywhere}.member-dialog .status:not(:empty){padding:12px 14px;margin-top:16px;border-radius:10px;background:#6ce4c40c;border:1px solid #6ce4c430;color:#dbf7ef;font-size:15px;font-weight:600;line-height:1.65}.member-dialog.member-confirm .confirm-copy{font-size:20px;font-weight:700;line-height:1.65;text-align:center;letter-spacing:-.02em}.member-dialog.member-confirm .actions button{font-weight:700}

.member-dialog:not(.member-chat):not(.member-confirm){padding-bottom:18px}

/* Keep membership actions alongside the existing mobile brand. */
@media(max-width:600px){
 .home-root .top:has(.member-bar-wrap){flex-wrap:nowrap;align-items:center;gap:10px}
 .home-root .top:has(.member-bar-wrap) .brand{flex:0 0 auto}
 .home-root .member-bar-wrap{flex:1 1 0;min-width:0;max-width:none;margin-left:auto}
 .home-root .member-bar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px}
 .home-root .member-bar button{width:100%;min-width:0;min-height:38px;margin:0;padding:7px 5px;white-space:nowrap;font-size:14px;line-height:1.4}
 .home-root .member-bar[data-role="member"] button:last-child{grid-column:1 / -1}
 .home-root .member-greeting{font-size:12px;line-height:1.45;top:0;margin:7px 0 0;overflow-wrap:anywhere}
 .member-dialog.member-profile{padding:14px 16px;box-sizing:border-box}
 .member-profile .member-head{margin-bottom:10px}
 .member-profile .member-head h2{margin:0}
 .member-dialog.member-profile [data-info]{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin:0}
 .member-dialog.member-profile [data-info] .profile-row{padding:9px 10px;gap:3px}
 .member-profile .profile-label{font-size:12px}
 .member-profile .profile-value{font-size:15px;line-height:1.4}
 .member-profile .profile-login{grid-column:1 / -1}
 .member-profile .actions{margin-top:12px;gap:8px}
}

@media(max-width:600px){
 .home-root .top:has(.member-bar-wrap){display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:10px;row-gap:6px;align-items:center}
 .home-root .member-bar-wrap{display:contents}
 .home-root .member-bar{grid-column:2;grid-row:1;grid-template-columns:repeat(2,minmax(0,1fr));gap:4px}
 .home-root .member-bar[data-role="member"]{grid-template-columns:repeat(3,minmax(0,1fr))}
 .home-root .member-bar[data-role="admin"]{grid-template-columns:repeat(4,minmax(0,1fr));gap:3px}
 .home-root .member-bar[data-role="member"] button:last-child{grid-column:auto}
 .home-root .member-bar[data-role="member"] button{font-size:13px;padding-inline:3px}
 .home-root .member-bar[data-role="admin"] button{font-size:11.5px;padding-inline:2px;letter-spacing:-.02em;min-height:38px}
 .home-root .member-greeting{grid-column:1 / -1;grid-row:2;margin:0;white-space:nowrap;word-break:keep-all;text-align:right;font-size:12px;line-height:1.5}
}
@media(max-width:340px){
 .home-root .top:has(.member-bar-wrap){column-gap:8px}
 .home-root .member-bar[data-role="admin"]{gap:2px}
 .home-root .member-bar[data-role="admin"] button{font-size:10.5px}
 .home-root .member-bar[data-role="member"] button{font-size:12px}
 .home-root .member-greeting{font-size:11px}
}

@media(max-width:600px){.member-dialog .links button{font-size:clamp(12px,3.5vw,14px);white-space:nowrap;word-break:normal;padding-inline:3px;line-height:1.4}}

.member-dialog.member-login-success{width:min(86vw,400px);box-sizing:border-box}.member-login-success .member-head{justify-content:center}.member-login-success h2{width:100%;text-align:center}.member-login-success .actions button{text-align:center}

.offline-profile-actions{display:grid;grid-template-columns:1fr;gap:8px}.offline-request-row{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.5fr) 44px;gap:10px;align-items:center;padding:12px 0;border-bottom:1px solid #38506a}.offline-request-row span{overflow-wrap:anywhere}.offline-approve{color:#69e8bb;border-color:#69e8bb;min-height:44px;font-size:22px}.home-root .member-bar button{white-space:nowrap}
@media(max-width:600px){.home-root .member-bar[data-role="admin"]{grid-template-columns:minmax(0,.6fr) minmax(0,1.5fr) repeat(3,minmax(0,1fr));gap:2px}.home-root .member-bar[data-role="admin"] button{font-size:clamp(8px,2.55vw,11px);padding-inline:1px;min-width:0;min-height:38px;letter-spacing:-.05em}.home-root .top:has(.member-bar[data-role="admin"]){column-gap:4px}.home-root .top:has(.member-bar[data-role="admin"]) h1{font-size:clamp(12px,3.8vw,18px)}}

.member-notice .member-head{justify-content:center;text-align:center}.member-notice .actions{justify-content:center;grid-template-columns:minmax(120px,220px)}.member-notice .notice-detail{font-size:15px;line-height:1.7;text-align:center}.member-notice .notice-condition{font-size:12px;line-height:1.6;text-align:center;opacity:.75}.streak-flame{position:relative;max-width:320px;width:min(100%,320px);margin:12px auto}.streak-flame img{width:100%;display:block;animation:flame-breathe 2.5s ease-in-out infinite}.streak-flame strong{position:absolute;left:18%;right:18%;top:62%;transform:translateY(-50%);font-size:clamp(20px,5vw,29px);line-height:1.3;color:#fff;text-align:center;overflow-wrap:normal;text-shadow:0 2px 8px #001827}.member-greeting strong{color:var(--mint,#68e0ca)}@keyframes flame-breathe{50%{transform:scale(1.025);filter:brightness(1.08)}}@media(prefers-reduced-motion:reduce){.streak-flame img{animation:none}}

.member-notice .actions button{flex:0 1 220px;width:min(100%,220px);margin:0 auto}.member-notice .actions{display:flex;justify-content:center}

.streak-flame img{animation:none}.streak-flame strong{top:72%;left:14%;right:14%;font-size:clamp(18px,5vw,27px);word-break:keep-all}

/* Scoped online release controls, never applied to learning/PDF buttons. */
.member-dialog p,.member-dialog h2,.member-dialog label,.profile-page{word-break:keep-all;overflow-wrap:break-word;}
.member-dialog .actions{display:flex;justify-content:center;gap:12px;}.member-dialog .actions>button{flex:1 1 0;min-width:0;}.member-notice .actions>button:only-child{flex:0 1 180px;}.member-dialog .confirm-copy{text-align:center;line-height:1.65;font-weight:650;}
.profile-page{box-sizing:border-box;width:min(100% - 32px,760px);margin:24px auto;background:#122739;border:1px solid #30485d;border-radius:20px;padding:20px;color:#e7f3f5;}.profile-page .actions{display:flex;gap:12px;}.profile-page .actions button{flex:1;min-height:44px;}.profile-page [data-info]{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;}.profile-page .profile-row{margin:0;min-width:0;}
.management-tabs{display:flex;gap:10px;margin-bottom:16px}.management-tabs button{flex:1;min-width:0}.signup-badge{background:#ea5463;color:white;border-radius:999px;font-size:11px;padding:1px 5px;margin-left:4px;display:inline-block}.signup-badge[hidden]{display:none!important;}.signup-request-row{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;border:1px solid #30485d;border-radius:14px;padding:14px;margin-bottom:12px}.signup-request-row small{display:block;color:#9fbbc7}.signup-request-row span{overflow-wrap:anywhere}.request-controls{grid-column:1/-1;display:flex;justify-content:flex-end;gap:10px}.approval-check{color:#62e6c4!important}.presence-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid #30485d}.member-bar{flex-wrap:nowrap!important}.member-bar button{white-space:nowrap;position:relative}
@media(max-width:600px){.member-bar-wrap{min-width:0}.member-bar button{font-size:10px!important;padding:5px 6px!important;min-width:0!important;height:30px!important;min-height:30px!important;}.member-bar{gap:4px!important;}.member-bar[data-role="admin"] button{font-size:9px!important;padding-inline:4px!important;}.member-bar .signup-badge{font-size:9px;padding:0 3px;margin-left:2px}.profile-page{width:calc(100% - 24px);padding:12px;margin:14px auto}.profile-page [data-info]{gap:7px}.profile-page .profile-row{padding:10px}.profile-page .profile-value{font-size:14px}.profile-page .profile-label{font-size:11px}.member-dialog{max-height:calc(100dvh - 32px);}.member-dialog input{scroll-margin-bottom:80px}}

.streak-flame{max-width:240px;width:min(100%,240px)}.streak-flame strong{top:64%;left:18%;right:18%;font-size:clamp(15px,4.5vw,20px);line-height:1.25;}

.name-instruction{font-size:11px;line-height:1.45;color:#b5cdd7;margin:3px 0 6px}.management-tabs button{position:relative}.signup-badge{position:absolute;top:-5px;right:-3px;pointer-events:none}.profile-page .actions button{font-family:inherit;background:#143c3b;color:#dffbf5;border:1px solid #5b9487;border-radius:10px;padding:10px;}

[data-presence-count]{white-space:pre-line;line-height:1.7}

.admin-page{padding:20px 0}.admin-card-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}.admin-card{position:relative;min-height:300px;background:linear-gradient(135deg,#1b3046,#101c2e);border:1px solid #35485e;border-radius:24px;color:#f1f5ff;overflow:hidden;font:inherit;cursor:pointer;padding:26px 16px}.admin-card:before{content:"";position:absolute;left:24px;top:0;width:70%;height:3px;background:#70ddca}.admin-card h2{position:relative;z-index:1;text-align:center;font-size:27px;word-break:keep-all}.admin-art{position:absolute;right:20px;bottom:24px;font-size:55px;opacity:.1;font-weight:900}.member-dialog textarea{box-sizing:border-box;width:100%;background:#152a3b;border:1px solid #527484;border-radius:10px;color:#edf5ff;padding:12px;font:inherit;resize:vertical}.streak-flame[data-tier="1"] strong{color:#69f4dc}.streak-flame[data-tier="2"] strong{color:#ffae43}.streak-flame[data-tier="3"] strong{color:#60cfff}.streak-flame[data-tier="4"] strong{color:#f690f7}.streak-flame[data-tier="5"] strong{color:#ffdb70}.streak-flame strong{text-shadow:0 2px 8px #000,0 0 4px #000}.streak-flame img{width:280px;max-width:100%;height:280px;object-fit:contain}.streak-flame{min-height:280px}.member-bar button{white-space:nowrap}@media(max-width:790px){.admin-card-grid{grid-template-columns:1fr;gap:14px}.admin-card{min-height:190px}.admin-card h2{font-size:24px}}@media(max-width:400px){.member-bar[data-role="admin"] button{padding-inline:5px;font-size:9px}.member-bar[data-role="admin"]{gap:4px}}

.streak-flame{width:min(100%,280px);max-width:280px;min-height:0;aspect-ratio:1}.streak-flame img{width:100%;height:auto;aspect-ratio:1}.streak-flame strong{top:59%;left:19%;right:19%}

@media(max-width:600px){.home-root .member-bar[data-role="admin"]{grid-template-columns:minmax(0,1.8fr) minmax(0,.8fr) minmax(0,1.2fr) minmax(0,.8fr)}.home-root .member-bar[data-role="admin"] button{padding-inline:3px!important;font-size:9px!important}.home-root .member-bar[data-role="admin"] .signup-badge{position:absolute;top:-5px;right:-3px;margin:0;font-size:8px}}

/* The separate member page needs its own info-cell styles (dialog rules do not match). */
@media screen{
 .profile-page{width:min(calc(100% - 32px),1000px);padding:24px;background:linear-gradient(145deg,#192d42,#101d2e);box-shadow:inset 0 1px 0 #ffffff08}
 .profile-page [data-info]{gap:12px}
 .profile-page [data-info] .profile-row{display:flex;flex-direction:column;gap:8px;padding:18px 20px;border:1px solid #6ce4c430;border-radius:14px;background:#1b3044;min-width:0}
 .profile-page .profile-label{display:block;color:#91b8bc;font-size:13px;font-weight:650;line-height:1.4}
 .profile-page .profile-value{display:block;color:#f0f7ff;font-size:18px;font-weight:750;line-height:1.45;overflow-wrap:anywhere;word-break:keep-all}
 .profile-page .profile-login .profile-value{color:#77ead0}
 .profile-page .actions{margin-top:18px}
 .profile-page [data-sync-state]{margin:12px 2px;color:#a6c5cb;font-size:13px}
}
@media screen and (max-width:600px){
 .profile-page{width:calc(100% - 20px);padding:12px;margin:12px auto}
 .profile-page [data-info]{gap:8px}
 .profile-page [data-info] .profile-row{padding:12px 10px;gap:6px}
 .profile-page .profile-label{font-size:11px}
 .profile-page .profile-value{font-size:15px}
 .profile-page .actions{gap:8px;margin-top:12px}
}

@media screen{
 .admin-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .admin-card{min-height:240px}
 .member-presence [data-presence-count]{padding:18px;background:linear-gradient(135deg,#1b3546,#18283b);border:1px solid #65d8bf45;border-radius:14px;color:#bce8dc;font-size:17px;font-weight:750;margin:4px 0 16px}
 .member-presence .presence-row{margin-top:8px;border:1px solid #30485d;border-radius:12px;padding:12px 14px;background:#1a2d40}
 .member-presence [data-present-members] p{padding:12px 14px;background:#1a2d40;border-radius:12px}
 .member-presence details{border:1px solid #30485d;border-radius:12px;padding:12px;margin-top:16px}
 .member-management .member-head{align-items:flex-start}
 .member-management .member-head .close{transform:translateY(-5px)}
 .announcement-banner{position:fixed;left:12px;right:12px;z-index:1100;box-sizing:border-box;max-width:1000px;margin:8px auto 0;padding:14px 18px;background:#173c43f5;border:1px solid #70e3cc;border-radius:14px;color:#eef9f8;box-shadow:0 6px 24px #0005;font:15px/1.55 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;overflow-wrap:anywhere;max-height:35dvh;overflow:auto}
 .announcement-banner strong{color:#77ead0;white-space:nowrap}
}
@media screen and (max-width:790px){.admin-card-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.admin-card{min-height:220px}.admin-card h2{font-size:20px}.admin-art{font-size:34px;right:12px}.announcement-banner{left:8px;right:8px;padding:12px;font-size:14px}}

@media screen{.profile-page [data-info] .profile-row:last-child{grid-column:1/-1}}

@media screen and (max-width:790px) and (max-height:650px){.admin-card{min-height:180px}.admin-card h2{font-size:18px}}

@media screen and (max-width:790px){.admin-art{font-size:clamp(22px,6.5vw,26px)}}

.member-dialog.member-trial-intro .actions{grid-template-columns:minmax(0,180px);justify-content:center}

/* Equal label-to-input and row spacing in account ID recovery. */
.member-dialog.member-find form{display:grid;gap:12px}
.member-dialog.member-find label{display:flex;flex-direction:column;gap:6px;margin:0;line-height:1.4}
.member-dialog.member-find input{display:block;box-sizing:border-box;width:100%;min-width:0;min-height:44px;margin:0}
.member-dialog.member-find .check:empty{display:none}
.member-dialog.member-find .check:not(:empty){margin:0;min-height:0}
.member-dialog.member-find .actions{margin-top:4px}

.presence-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px;margin:12px 0}.presence-tabs button{padding:10px 3px!important;font-size:clamp(10px,2.6vw,14px)!important;white-space:nowrap;min-width:0}.presence-tabs button[aria-selected="true"]{background:#245248;border-color:#6be8ca}.presence-member-row{display:grid;grid-template-columns:1fr 1fr 1.7fr;gap:8px;padding:12px;border:1px solid #30485d;border-radius:12px;margin-top:8px;background:#1a2d40;font-size:13px}.presence-member-row span{overflow-wrap:anywhere}.member-presence [hidden]{display:none!important}

.presence-member-row{grid-template-columns:1fr 1fr 1.6fr auto;align-items:center}.presence-member-row small{display:block;color:#a4bac8;font-size:11px;margin-bottom:4px}.presence-member-row button{padding:8px 10px!important;white-space:nowrap}.block-duration{display:grid;gap:12px}.block-duration label{display:flex;flex-direction:column;gap:6px}.block-duration select{font:inherit;color:#e8f4fc;background:#1a2d40;border:1px solid #456477;border-radius:10px;padding:12px}@media(max-width:500px){.presence-member-row{grid-template-columns:1fr 1fr}.presence-member-row>div{justify-self:end}.presence-member-row span{font-size:12px}}

/* Chat rooms: retain the existing navy/mint palette. */
.member-dialog.member-chat{width:min(94vw,1040px);height:min(88dvh,850px);max-height:90dvh;padding:22px}
.member-chat .chat-tabs{display:flex;gap:6px;flex:none;margin-bottom:10px}
.member-chat .chat-tabs button{flex:1;min-width:0;padding:8px;font-size:14px;white-space:nowrap}
.member-chat .chat-tabs [aria-selected="true"]{background:#19443e;border-color:#6ce4c4;color:#6ce4c4}
.member-dialog.member-chat .chat-list{gap:7px;padding:7px 0}
.member-chat .message{position:relative;padding:6px 16px;width:min(85%,650px);flex-shrink:0}
.member-chat .message small{padding-right:38px;margin-bottom:2px}
.member-chat .message .chat-time{display:block;text-align:right;font-size:11px;color:#a8c7c0;margin-top:3px;white-space:nowrap}
.member-chat .message .chat-delete{position:absolute;right:7px;top:5px;padding:2px 4px;min-height:24px;min-width:28px;font-size:10px;border:0;background:transparent;color:#ff8898;line-height:1.2}
.chat-management-row{display:flex;align-items:center;gap:12px;padding:14px 0;border-bottom:1px solid #29384c}
.chat-management-row>div{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;flex:1;min-width:0}
.chat-management-row span{overflow-wrap:anywhere}.chat-management-row small{display:block;color:#9cacc1;font-size:12px}.chat-management-row p{grid-column:1/-1;margin:0;font-size:12px;color:#ff8898}
@media(max-width:600px){.member-dialog.member-chat{width:96vw;height:90dvh;padding:14px}.member-chat .chat-tabs{gap:4px}.member-chat .chat-tabs button{padding:6px 3px;font-size:11px}.chat-management-row>div{grid-template-columns:1fr}.chat-management-row{gap:8px}.member-chat .message{width:87%}}

@media(max-width:600px){.member-chat .chat-tabs>button:not([role]){flex:1.6;min-width:78px;font-size:10px;letter-spacing:-.3px}}

.home-root .member-bar-wrap:has(.member-bar[data-role="guest"]){margin-left:auto}.home-root .member-bar[data-role="guest"]{display:flex;justify-content:flex-end;justify-self:end;width:max-content;margin-left:auto}
@media(max-width:600px){.presence-tabs button{white-space:normal;word-break:keep-all;font-size:9px!important;min-height:44px;line-height:1.4}}

.admin-card .admin-signup-badge{position:absolute;top:18px;right:18px;min-width:28px;min-height:28px;box-sizing:border-box;padding:3px 8px;font-size:14px;line-height:22px;z-index:2;background:#ea5463;color:#fff;border-radius:999px}

.block-duration .duration-guide{margin:0 0 14px;color:#b8ccd7;font-size:14px;word-break:keep-all}
.block-duration .duration-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.block-duration .duration-grid label{margin:0;padding:12px;border:1px solid #39576b;border-radius:14px;background:#192b3e;text-align:center;font-weight:700;color:#78e5cf}
.block-duration .duration-grid input{box-sizing:border-box;width:100%;min-width:0;text-align:center;margin:8px 0 0;font-size:22px;min-height:54px;padding:8px;border:1px solid #548d83;border-radius:10px;background:#081b29;color:#f3f7fc;font-family:inherit}
.block-duration .duration-total{padding:12px;margin:14px 0 0;border-radius:10px;background:#123b3580;color:#a7ecdc;text-align:center;font-size:14px;word-break:keep-all}
.block-duration .actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:18px}.block-duration .actions button{min-width:0;width:100%;font-weight:700}
@media(max-width:600px){.block-duration .duration-grid{gap:7px}.block-duration .duration-grid label{padding:10px 7px}.block-duration .duration-grid input{font-size:20px}.block-duration .duration-total{font-size:13px}}
/* Account decoration is independent of learning records. */
.profile-avatar{position:relative;display:inline-grid;place-items:center;width:60px;height:60px;flex:none;vertical-align:middle;isolation:isolate}.profile-photo{display:block;width:64%;height:64%;object-fit:cover;border-radius:50%;background:#1c3347}.profile-avatar>picture{position:absolute;inset:0;pointer-events:none}.profile-ring{width:100%;height:100%;display:block;object-fit:contain}.profile-title{display:inline-block;max-width:100%;font-size:11px;font-weight:700;color:#6ce4c4;border:1px solid #6ce4c45;background:#19443e;border-radius:20px;padding:2px 8px;line-height:1.5;overflow-wrap:anywhere;white-space:normal}.profile-hero{display:flex;flex-direction:column;align-items:center;gap:14px;padding:10px 0 24px}.profile-preview{display:flex;flex-direction:column;align-items:center;gap:8px}.profile-preview .profile-avatar{width:172px;height:172px}.profile-photo-actions{display:flex;gap:10px;flex-wrap:wrap;justify-content:center}.profile-photo-actions button,.appearance-settings button{border:1px solid #6ce4c460;background:#19443e;color:#f3f7fc;border-radius:12px;padding:12px 16px;font:inherit;min-height:44px;cursor:pointer}.appearance-settings{display:grid;grid-template-columns:1fr 1fr;gap:16px;margin:24px 0}.appearance-settings section{background:#1c2c42;border:1px solid #6ce4c430;border-radius:16px;padding:18px;min-width:0}.appearance-settings h3{margin:0 0 12px}.appearance-settings select{width:100%;min-height:44px;padding:9px;border:1px solid #548d83;border-radius:10px;background:#081b29;color:#f3f7fc;font:inherit}.appearance-settings p{font-size:13px;line-height:1.5;color:#aebfd4;min-height:40px;word-break:keep-all}.appearance-settings button{width:100%}.photo-editor{width:min(92vw,440px);box-sizing:border-box}.avatar-crop{display:block;width:220px;height:220px;max-width:100%;border-radius:50%;margin:12px auto;outline:2px solid #6ce4c4}.photo-editor input[type=range]{width:100%;min-height:30px;accent-color:#6ce4c4}.photo-editor .actions{display:grid;grid-template-columns:1fr 1fr;gap:12px}.member-chat .message{display:flex;gap:7px;padding:6px 10px}.member-chat .message .profile-avatar{width:46px;height:46px;align-self:flex-start}.chat-message-body{flex:1;min-width:0}.chat-message-heading{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-bottom:2px;padding-right:28px}.member-chat .chat-message-heading small{padding:0;margin:0;overflow-wrap:anywhere}.member-chat .chat-message-body>span{display:block}.member-account-card>.profile-avatar{grid-row:1/3;align-self:center}.member-account-card{grid-template-columns:60px repeat(4,minmax(0,1fr)) auto!important}.member-account-field .profile-title{align-self:flex-start}
@media(max-width:600px){.appearance-settings{grid-template-columns:1fr;gap:12px}.profile-preview .profile-avatar{width:146px;height:146px}.member-chat .message{width:92%;gap:5px;padding:6px 8px}.member-chat .message .profile-avatar{width:40px;height:40px}.member-account-card{grid-template-columns:54px repeat(2,minmax(0,1fr)) auto!important}.member-account-card>.profile-avatar{width:52px;height:52px;grid-row:1/4}.member-account-field{min-width:0}.profile-photo-actions button{font-size:13px;padding:10px 12px}}
.member-bar button:has([data-chat-unread]),.chat-tabs [data-room]{position:relative}.chat-unread-badge{position:absolute;right:-6px;top:-7px;pointer-events:none;min-width:19px;height:19px;font-size:10px;line-height:19px;padding:0 4px;border-radius:12px;background:#ea5463;color:#fff;font-weight:750;box-sizing:border-box;z-index:1}.chat-unread-badge[hidden]{display:none}.member-settings{width:min(92vw,480px);box-sizing:border-box}.notification-row{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 0;border-bottom:1px solid #29384c}.notification-row strong{font-size:16px;word-break:keep-all}.notification-row button{min-width:80px;padding:9px 16px;border-radius:12px}.notification-row button[aria-pressed=true]{color:#6ce4c4;border-color:#6ce4c4;background:#19443e}.notification-row button[aria-pressed=false]{color:#bac5d4;background:#223044}.member-settings .notice-condition,.settings-guide{font-size:13px!important;line-height:1.65;word-break:keep-all}.settings-guide{color:#9cacc1;margin:10px 0}

.member-chat .message:has(.chat-delete) .chat-message-heading{min-height:24px}
.member-chat .chat-tabs{flex-wrap:wrap}.chat-history-button{align-self:center;margin:3px 0;min-height:36px!important;font-size:13px}.member-chat .message:has(.chat-report) .chat-message-heading{min-height:24px}.moderation-dialog{width:min(92vw,540px);box-sizing:border-box}.moderation-dialog blockquote{margin:12px 0;padding:12px;background:#1c2c42;border-radius:12px;white-space:pre-wrap;overflow-wrap:anywhere;max-height:160px;overflow:auto}.moderation-dialog select,.moderation-dialog textarea{width:100%;box-sizing:border-box;background:#081b29;border:1px solid #548d83;border-radius:10px;color:#f3f7fc;padding:12px;font:inherit;margin:8px 0}.moderation-dialog .actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}.moderation-dialog p{word-break:keep-all;overflow-wrap:anywhere}.moderation-dialog p>strong,.moderation-dialog p>span{display:block;white-space:pre-wrap}.report-summary{display:flex;flex-direction:column;align-items:flex-start;gap:8px;width:100%;margin:10px 0;text-align:left;padding:14px;white-space:normal;overflow-wrap:anywhere}.report-summary span{font-size:12px;color:#aec4ce}.report-pagination{display:flex;gap:5px;justify-content:center;align-items:center;flex-wrap:wrap;margin:18px 0 0}.report-pagination button{min-width:34px;padding:7px}.report-pagination .current{background:#286253;border-color:#6ce4c4}.search-compose select{max-width:90px;background:#162c36;color:#f3f7fc;border:1px solid #548d83;border-radius:10px;min-height:46px;font:inherit;padding:7px}.search-compose textarea{min-width:0!important}.moderation-dialog .report-status{color:#ff8898}@media(max-width:600px){.member-chat .search-compose{gap:5px}.member-chat .search-compose button{padding:10px}.search-compose select{max-width:75px;font-size:12px}.member-chat .chat-tabs button{font-size:11px}.report-pagination button{min-width:30px;padding:5px}.moderation-dialog{max-height:88dvh;overflow:auto}}
/* A stable author column for both incoming and outgoing messages. */
.member-chat .chat-author{display:flex;flex-direction:column;align-items:center;justify-content:center;align-self:center;flex:0 0 76px;min-width:0;gap:3px;text-align:center}
.member-chat .chat-author .profile-avatar{align-self:center;width:56px;height:56px}
.member-chat .chat-author small{display:block;width:100%;padding:0;margin:0;font-size:11px;line-height:1.35;overflow-wrap:anywhere}
.member-chat .chat-author .profile-title{padding:0;border:0;background:transparent;font-size:10px;line-height:1.35;overflow-wrap:anywhere}
.profile-photo-actions{flex-direction:column;align-items:stretch;width:min(100%,320px)}
.profile-hero{padding-bottom:8px}.appearance-settings{margin:12px 0 24px}
@media(max-width:600px){.member-chat .chat-author{flex-basis:60px}.member-chat .chat-author .profile-avatar{width:48px;height:48px}.member-chat .chat-author small{font-size:10px}.member-chat .chat-author .profile-title{font-size:9px}.member-chat .message{gap:7px}}
.chat-author-caption{grid-row:3;width:100%;padding-top:3px;box-sizing:border-box;display:flex;flex-direction:column;align-items:center;gap:3px}
.admin-device-settings{margin-top:24px;padding:20px;border:1px solid #456b70;border-radius:20px;background:#152333}.admin-device-settings .notification-row{gap:16px}.admin-device-settings button{min-width:64px}.warning-history{padding:14px 0;border-bottom:1px solid #334758}.warning-history p,.warning-body{white-space:pre-wrap;overflow-wrap:anywhere;word-break:keep-all}.member-warning{width:min(520px,calc(100vw - 32px));max-height:85dvh}.member-warning h2{text-align:center}.warning-body{max-height:50dvh;overflow:auto;padding:12px 4px;line-height:1.6}.member-warning .actions{justify-content:center}.member-warning .actions button{flex:0 1 230px}.member-confirm .confirm-copy{white-space:pre-wrap;max-height:55dvh;overflow:auto} .warning-history small{color:#a8b9c8}

.entrance-settings .entrance-disable{display:flex;align-items:center;gap:10px}.entrance-settings .entrance-disable input{width:20px;height:20px;flex:0 0 20px;margin:0}.entrance-settings .actions{display:grid;grid-template-columns:1fr 1fr;gap:12px}.entrance-settings input:disabled{opacity:.45}

/* Titles use the existing compact author area, without the balanced empty rows. */
.member-chat .chat-author{display:flex;flex-direction:column;justify-content:flex-start;align-self:flex-start;gap:1px;height:auto;box-sizing:border-box}
.member-chat .chat-author:before{content:none}
.member-chat .chat-author .profile-avatar{width:48px;height:48px}
.member-chat .chat-author .profile-title{flex:none;line-height:12px;font-size:10px;max-width:100%}
.member-chat .chat-author-caption{padding-top:0;gap:0}
.member-chat .chat-author small{line-height:14px}
.member-chat .message{min-height:76px;box-sizing:content-box}
@media(max-width:600px){.member-chat .chat-author{height:auto}.member-chat .chat-author .profile-avatar{width:44px;height:44px}.member-chat .chat-author .profile-title{font-size:9px;line-height:10px}.member-chat .message{min-height:70px}}

.member-bar[data-role="admin"] [data-member-action="admin"]{padding-inline:8px;font-size:12px}.member-bar[data-role="admin"] [data-member-action="chat"]{min-width:88px;padding-inline:22px}
@media(max-width:600px){.home-root .member-bar[data-role="admin"]{grid-template-columns:minmax(0,1.2fr) minmax(0,1.4fr) minmax(0,1.2fr) minmax(0,.8fr)}.member-bar[data-role="admin"] [data-member-action="chat"]{min-width:0;padding-inline:3px}}
.report-already{text-align:center}.report-already .actions{display:flex;justify-content:center}.report-already .actions button{flex:0 1 230px}.warning-history-panel{margin-top:22px;border:1px solid #456b70;border-radius:12px;padding:12px}.warning-history-panel summary{cursor:pointer;font-weight:700;color:#6ce4c4;padding:5px}.member-warning h2{white-space:pre-wrap;overflow-wrap:anywhere;word-break:keep-all}
/* Shared social and notification controls: scoped to member surfaces. */
.signup-badge,.chat-unread-badge,.admin-card .admin-signup-badge{position:absolute;top:-6px;right:-5px;min-width:20px;min-height:20px;height:20px;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;padding:0 5px;margin:0;border-radius:999px;background:#ea5463;color:#fff;font-family:inherit;font-weight:750;font-size:11px;line-height:20px;z-index:3;pointer-events:none}
.signup-badge[hidden]{display:none!important}.signup-separate{right:21px;background:#d74654}.admin-card .admin-signup-badge{top:10px;right:10px}.member-bar .signup-badge{font-size:11px!important;line-height:20px!important}.member-bar button{min-height:38px!important}.member-bar[data-role=admin]{gap:8px}.report-state-tabs{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin:12px 0}.report-state-tabs button,.social-toolbar button{position:relative}.report-state-tabs button[aria-pressed=true]{border-color:#6ce4c4;background:#19443e}.report-list{max-height:48dvh;overflow-y:auto;overscroll-behavior:contain}.report-summary{width:100%;text-align:left;display:flex;flex-direction:column;gap:6px;margin:10px 0;padding:14px}.report-summary span{font-size:13px;color:#b7cbd9;word-break:keep-all}.report-pagination{justify-content:center;flex-wrap:wrap}.warning-history{display:grid;grid-template-columns:1fr auto;gap:8px}.warning-history p,.warning-history small{grid-column:1/-1}.warning-history-delete{align-self:start;min-height:36px}.profile-avatar[data-flame]>.profile-photo{transform:translateY(2%)}.profile-avatar[data-flame]>picture{inset:-5%;width:110%;height:110%}.member-chat .chat-author[role=button]{cursor:pointer}.member-chat .chat-author:focus-visible{outline:2px solid #6ce4c4;outline-offset:3px}.member-friends{width:min(92vw,900px);box-sizing:border-box}.social-toolbar{display:flex;gap:10px;flex-wrap:wrap;margin:12px 0}.social-toolbar button{min-height:42px;flex:1;white-space:normal;word-break:keep-all}.social-list{max-height:65dvh;overflow-y:auto;overscroll-behavior:contain}.social-row{display:grid;grid-template-columns:85px minmax(0,1fr) auto;gap:14px;align-items:center;padding:14px 4px;border-bottom:1px solid #31475b}.social-row>span{overflow-wrap:anywhere}.social-author{display:flex;flex-direction:column;align-items:center;gap:3px;width:80px;flex:none}.social-author small{max-width:100%;text-align:center;overflow-wrap:anywhere}.social-profile-button{padding:2px!important;background:transparent!important;border:0!important}.social-request-actions{display:flex;gap:10px}.social-request-actions button{width:42px;height:42px;font-size:24px;padding:0}.friend-accept{color:#6ce4c4!important}.friend-reject{color:#ff7383!important}.social-profile{width:min(92vw,480px);box-sizing:border-box}.social-profile .social-author{width:100%;}.social-profile .profile-avatar{width:100px;height:100px}.social-profile-stats{text-align:center}.social-profile-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.social-profile-actions button{font-size:13px;word-break:keep-all;min-height:44px}.friend-chat-row{width:100%;display:grid;grid-template-columns:64px minmax(0,1fr) auto;gap:14px;align-items:center;text-align:left;border:0!important;border-bottom:1px solid #31475b!important;border-radius:0!important;padding:16px 6px!important;background:transparent!important}.friend-chat-row>div>strong,.friend-chat-row>div>span{display:block;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.friend-chat-row>div>span{font-size:13px;color:#b5c4d1;margin-top:5px}.friend-chat-meta{position:relative;align-self:stretch;display:flex;flex-direction:column;align-items:flex-end;justify-content:center;gap:8px}.friend-chat-meta .signup-badge{position:static}.friend-chat-meta time{font-size:12px;color:#b5c4d1;white-space:nowrap}.private-chat .compose{grid-template-columns:42px minmax(0,1fr) auto;display:grid;gap:8px}.private-chat .compose [data-photo]{min-width:0;padding:0;font-size:24px}.private-message-photo{display:block;max-width:100%;width:auto;max-height:320px;object-fit:contain;border-radius:10px;margin:4px 0}.private-chat [data-photo-preview]{display:flex;align-items:center;gap:12px}.private-chat [data-photo-preview] img{max-height:70px;max-width:90px}.private-chat .chat-author{height:auto;min-height:0}.private-chat .message{align-items:center}.social-profile .profile-title{max-width:100%;}.member-dialog{box-sizing:border-box;overflow-x:hidden}.member-dialog .member-head h2{min-width:0;word-break:keep-all}.member-dialog .actions{gap:12px}.member-dialog label{display:block}.member-dialog label input,.member-dialog label textarea{margin-top:8px}
@media(max-width:600px){.home-root .member-bar,.home-root .member-bar[data-role=admin]{display:flex!important;flex-wrap:nowrap!important;justify-content:flex-end;gap:6px!important}.home-root .member-bar button{font-size:11px!important;padding:7px 9px!important;min-height:36px!important;height:auto!important}.home-root .member-bar[data-role=admin] [data-member-action=admin]{font-size:10px!important}.admin-card-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.admin-card{min-height:145px;padding:18px 12px}.admin-card h2{font-size:17px}.admin-art{font-size:27px;right:10px;bottom:14px}.member-dialog{max-width:calc(100vw - 24px);padding:18px;max-height:calc(100dvh - 24px)}.member-friends{width:calc(100vw - 24px)}.social-row{grid-template-columns:68px minmax(0,1fr) auto;gap:8px}.social-author{width:64px}.social-row .social-author .profile-avatar{width:54px;height:54px}.social-row>button{font-size:12px;min-height:40px;padding:8px}.social-toolbar{gap:8px}.social-toolbar button{font-size:12px;padding:9px;flex-basis:30%}.friend-chat-row{grid-template-columns:48px minmax(0,1fr) auto;gap:8px}.friend-chat-row .profile-avatar{width:48px;height:48px}.friend-chat-row strong{font-size:14px}.friend-chat-row span{font-size:12px}.private-chat .compose button[type=submit]{padding:8px;font-size:13px}.private-chat .compose textarea{min-height:44px}.signup-badge,.chat-unread-badge{font-size:11px!important;height:20px!important;min-width:20px!important;line-height:20px!important}.report-list{max-height:45dvh}}

.member-friends .social-toolbar>button:last-child{margin-left:auto;position:relative}

/* Keep signed-in mobile actions on one row and fit the admin dashboard to the available viewport. */
body:has(.admin-page){height:100dvh;min-height:0;display:flex;flex-direction:column;overflow:hidden}
body:has(.admin-page) main{flex:1;min-height:0;display:flex;flex-direction:column;overflow:hidden}
.admin-page{flex:1;min-height:0;padding:0;display:flex;flex-direction:column}
.admin-page .admin-card-grid{flex:1;min-height:0;grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr));gap:16px}
.admin-page .admin-card{min-height:0;padding:16px 12px;border-radius:20px}
.admin-page .admin-card h2{margin:0;font-size:clamp(18px,1.8vw,26px);line-height:1.4}
.admin-page .admin-art{font-size:clamp(24px,3.8vw,48px);bottom:12px;right:12px}
@media(max-width:790px){
 body:has(.admin-page) main{padding:12px 12px max(12px,env(safe-area-inset-bottom))}
 .admin-page .admin-card-grid{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(4,minmax(0,1fr));gap:10px}
 .admin-page .admin-card{padding:12px 10px;border-radius:18px}
 .admin-page .admin-card h2{font-size:clamp(15px,4vw,20px)}
 .admin-page .admin-art{font-size:24px;bottom:8px;right:10px}
}
@media(max-width:600px){
 .home-root .top:has(.member-bar[data-role=member]),.home-root .top:has(.member-bar[data-role=admin]){grid-template-columns:minmax(0,1fr);row-gap:8px}
 .home-root .top:has(.member-bar[data-role=member]) .brand,.home-root .top:has(.member-bar[data-role=admin]) .brand{grid-column:1;grid-row:1}
 .home-root .member-bar[data-role=member],.home-root .member-bar[data-role=admin]{display:grid!important;grid-column:1;grid-row:2;width:100%;grid-template-columns:1fr 1fr 1.2fr 1fr;gap:6px!important;justify-self:stretch}
 .home-root .member-bar[data-role=admin]{grid-template-columns:1.3fr 1fr .9fr 1.15fr .9fr}
 .home-root .member-bar[data-role=member] button,.home-root .member-bar[data-role=admin] button{width:100%;min-width:0!important;min-height:40px!important;height:40px!important;padding:7px 4px!important;font-size:13px!important;letter-spacing:-.03em}
 .home-root .member-bar[data-role=admin] [data-member-action=admin]{font-size:11px!important}
 .home-root .top:has(.member-bar[data-role=member]) .member-greeting,.home-root .top:has(.member-bar[data-role=admin]) .member-greeting{grid-column:1;grid-row:3;white-space:normal;overflow-wrap:anywhere}
}
@media(min-width:600px) and (max-height:500px){.admin-page .admin-card-grid{grid-template-columns:repeat(4,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr))}}

/* Compact home toolbar beside the brand; logout lives at the bottom of settings. */
.settings-logout{margin-top:18px;padding-top:16px;border-top:1px solid #35485e;display:flex;justify-content:center}.settings-logout button{width:100%;min-height:42px}
.presence-active-member{display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1.4fr);gap:10px;align-items:center}.presence-active-member span{min-width:0;overflow-wrap:anywhere}.presence-active-member span:nth-child(2){font-size:12px;color:#77ead0}.presence-active-member span:last-child{font-size:13px;text-align:right}
@media(max-width:600px){
 .home-root .top:has(.member-bar[data-role=member]),.home-root .top:has(.member-bar[data-role=admin]){grid-template-columns:auto minmax(0,1fr);column-gap:6px;row-gap:7px}
 .home-root .top:has(.member-bar[data-role=member]) .brand,.home-root .top:has(.member-bar[data-role=admin]) .brand{grid-column:1;grid-row:1;gap:4px;min-width:0}
 .home-root .top:has(.member-bar[data-role=member]) .official-mark,.home-root .top:has(.member-bar[data-role=admin]) .official-mark{width:26px!important;height:26px!important;flex-basis:26px;margin:0!important}
 .home-root .top:has(.member-bar[data-role=member]) .menu-program-name,.home-root .top:has(.member-bar[data-role=admin]) .menu-program-name{font-size:clamp(12px,3.4vw,16px)!important;letter-spacing:-.6px}
 .home-root .member-bar[data-role=member],.home-root .member-bar[data-role=admin]{grid-column:2;grid-row:1;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px!important}
 .home-root .member-bar[data-role=admin]{grid-template-columns:1.4fr 1fr 1fr 1fr}
 .home-root .member-bar[data-role=member] button,.home-root .member-bar[data-role=admin] button{font-size:clamp(10px,2.9vw,13px)!important;min-height:34px!important;height:34px!important;padding:5px 2px!important;letter-spacing:-.05em}
 .home-root .member-bar[data-role=admin] [data-member-action=admin]{font-size:clamp(8px,2.35vw,11px)!important}
 .home-root .top:has(.member-bar[data-role=member]) .member-greeting,.home-root .top:has(.member-bar[data-role=admin]) .member-greeting{grid-column:1/-1;grid-row:2}
 .home-root .member-bar[data-role=admin] .signup-badge{top:-7px;min-width:16px;height:16px!important;min-height:16px;font-size:9px!important;line-height:16px!important;padding:0 4px}
}
/* Dialog actions and shared chat layout, 2026-10-12. */
.member-dialog .actions{display:flex;justify-content:center;align-items:center;gap:12px}
.member-dialog .actions>button{flex:1 1 0;min-width:0;margin:0;text-align:center}
.member-dialog .actions>button:only-child{flex:0 1 230px;margin-inline:auto}
.member-chat .message,.member-chat .message.mine{align-items:center}
.member-chat .chat-author{align-self:center;justify-content:center}
.member-chat .chat-message-body{display:flex;flex-direction:column;justify-content:center;align-self:stretch;position:relative}
.member-chat .chat-message-body>span{text-align:left;width:100%;white-space:pre-wrap;overflow-wrap:anywhere}
.chat-read-check{position:absolute;right:5px;top:3px;font-size:10px;color:#73e1c5;line-height:1}
.chat-message-body:has(.chat-read-check){padding-top:14px}
.friend-chat-meta .signup-badge{display:inline-flex!important;align-items:center;justify-content:center;text-align:center;line-height:20px!important;flex-shrink:0;padding:0 5px!important}
.social-toolbar .signup-badge:empty{display:none!important}
.friend-chat-start{display:block;margin:4px 0 4px auto;min-height:32px;font-size:12px;padding:5px 10px}
.member-friends:has(.friend-chat-row) .social-list{max-height:60dvh}
.member-friends .friend-chat-start{width:calc(25% - 6px);margin-left:auto;margin-right:0;box-sizing:border-box;word-break:keep-all}
.member-chat .chat-author .profile-avatar{align-self:center}
.member-chat .chat-message-heading{min-height:0!important;margin:0}

/* Friend tab keeps the same outer chat shell; receipts belong only to private conversations. */
.member-dialog.member-chat.member-friends .social-list{flex:1;min-height:0;max-height:none;margin-bottom:12px}
.member-chat.member-friends .social-toolbar:empty{display:none}
.private-chat .chat-read-check{position:absolute;top:5px;right:7px;padding:0;margin:0;line-height:1}
.private-chat .message:has(>.chat-read-check) .chat-message-body{padding-top:14px}
.member-chat:not(.private-chat) .chat-read-check{display:none}

/* Keep desktop admin toolbar buttons at the same height. */
@media(min-width:601px){.member-bar[data-role="admin"]>button{height:42px!important;min-height:42px!important;box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center}}



/* Ten administrator tools fit the dashboard; permission tools are placeholders. */
.admin-page .admin-card-grid{grid-template-columns:repeat(5,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr))}
.admin-page .admin-card-planned{cursor:default}
@media(max-width:790px){.admin-page .admin-card-grid{grid-template-columns:repeat(2,minmax(0,1fr));grid-template-rows:repeat(5,minmax(0,1fr))}}
@media(min-width:600px) and (max-height:500px){.admin-page .admin-card-grid{grid-template-columns:repeat(5,minmax(0,1fr));grid-template-rows:repeat(2,minmax(0,1fr))}}



.private-photo-viewer{width:min(1100px,94vw);max-height:94dvh}.private-photo-viewer>img{display:block;max-width:100%;max-height:calc(90dvh - 110px);width:auto;height:auto;object-fit:contain;margin:12px auto}.private-message-photo[role=button]{cursor:zoom-in}
/* Friend start action shares the heading row with the close button. */
.member-chat.member-friends .member-head{gap:8px}
.member-chat.member-friends .member-head h2{flex:1}
.member-chat.member-friends .member-head>.friend-chat-start{flex:none;width:auto;margin:0;min-height:44px;padding:6px 8px;white-space:nowrap;transform:translateY(-5px)}
@media(max-width:600px){.member-chat .member-head h2{font-size:clamp(14px,4vw,23px)}}
/* Room badges belong to their tab, never the dialog's upper-right corner. */
.member-chat .chat-tabs button{position:relative}
.member-chat>.signup-badge,.member-chat .member-head>.signup-badge,.member-chat .signup-badge:empty{display:none!important}

.member-chat .friend-chat-meta .signup-badge[hidden]{display:none!important}
.member-chat.private-chat .message>.chat-read-check{top:2px;right:3px;left:auto;bottom:auto;margin:0;padding:0;z-index:4;pointer-events:none}
/* Rank cutouts keep the portrait wholly inside their measured transparent centre. */
.profile-avatar[data-rank]>.profile-photo{width:var(--rank-hole,35%);height:var(--rank-hole,35%);transform:none}
.profile-avatar[data-rank]>picture{inset:0;width:100%;height:100%}
.profile-avatar[data-rank] .profile-ring{width:100%;height:100%}
.member-reward-notice .reward-copy,.streak-plain{text-align:center;word-break:keep-all;overflow-wrap:normal;line-height:1.7;font-size:clamp(17px,2.4vw,22px)}.member-reward-notice .actions{grid-template-columns:minmax(120px,220px);justify-content:center}

.social-profile-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:18px 0}.social-profile-stats>div{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;padding:14px 8px;border:1px solid #345368;border-radius:14px;background:#122b3b;text-align:center}.social-profile-stats small{font-size:13px;color:#acc9d8}.social-profile-stats strong{font-size:20px;color:#e5f6f2;overflow-wrap:anywhere}.social-profile-stats>div:last-child{grid-column:1/-1}.quick-challenge-notice p{text-align:center;white-space:pre-line;word-break:keep-all;overflow-wrap:anywhere;line-height:1.7}.quick-challenge-notice .actions{display:flex;justify-content:center;gap:12px}.quick-challenge-notice .actions button{flex:1;max-width:220px;min-height:46px}.quick-challenge-notice .actions button:only-child{flex:0 1 180px}

.social-profile{margin:auto;max-height:calc(100dvh - 24px);overflow-y:auto;overflow-x:hidden}.social-profile>.member-head{position:sticky;top:-24px;z-index:5;background:#142131;padding:12px 0;margin-top:-12px}.social-profile .member-head .close{flex-shrink:0;align-self:center}.invite-countdown{font-size:.8em;margin-left:5px}.quick-start-seconds{display:block;font-size:64px;text-align:center;color:#8debd5;padding:18px}.social-profile-actions{grid-auto-flow:row}
.honor-dialog{width:min(960px,94vw);max-height:90dvh;overflow:auto;padding:24px;border-color:#537d88;background:radial-gradient(ellipse at 50% 0,#263b52 0,#142131 55%)}.honor-dialog .member-head{position:sticky;top:-24px;z-index:5;background:#142131;padding:12px 0;margin-top:-12px}.honor-dialog h2{text-align:center;flex:1;font-size:clamp(19px,3vw,30px);text-shadow:0 0 22px #67d6c455}.honor-rankings{display:grid;gap:10px;padding-top:12px}.honor-row{position:relative;display:grid;grid-template-columns:84px 76px minmax(0,1fr) 100px;align-items:center;gap:16px;min-height:86px;padding:12px 18px;border:1px solid #3d566a;border-radius:18px;background:linear-gradient(115deg,#203247,#152536);box-sizing:border-box;overflow:hidden}.honor-position{color:#bed5df;font-size:18px;text-align:center}.honor-row .chat-author{min-width:0;width:76px}.honor-row .profile-avatar{width:56px;height:56px}.honor-row .title-badge{max-width:100%;font-size:10px;overflow-wrap:anywhere;line-height:1.2}.honor-nickname{font-size:18px;overflow-wrap:anywhere;word-break:keep-all}.honor-value{text-align:right;color:#ddf9ee;font-size:23px;white-space:nowrap}.honor-place-1{min-height:108px;border:2px solid #e1bf67;background:radial-gradient(ellipse at 80% 0,#7d632344,transparent 75%),linear-gradient(115deg,#443822,#1e2c3f);box-shadow:0 0 20px #e6c46530,inset 0 0 24px #e6c46515}.honor-place-1 .honor-position,.honor-place-1 .honor-value{color:#ffe59d;text-shadow:0 0 12px #ffc95766}.honor-place-1::after{content:'✦';position:absolute;top:5px;right:10px;color:#ffe8a8;font-size:18px;pointer-events:none}.honor-place-2{border-color:#a6c1d5;background:linear-gradient(115deg,#33465b,#1e2d40);box-shadow:0 0 10px #aacbdd20}.honor-place-3{border-color:#bd946b;background:linear-gradient(115deg,#40352d,#202c3d)}.honor-mine{border-color:#68e5b0!important;box-shadow:0 0 15px #55de9b30!important;background:linear-gradient(115deg,#194937,#203247)!important}.honor-ellipsis{text-align:center;font-size:28px;margin:0;color:#8db5b4}.honor-award p{text-align:center;word-break:keep-all;overflow-wrap:anywhere;line-height:1.8}.honor-award .actions{justify-content:center}.honor-award .actions button{min-width:160px;max-width:220px}.honor-row>span{grid-column:2/-1;color:#9db4c5;text-align:center}
@media(max-width:600px){.honor-dialog{padding:15px;width:96vw;max-height:92dvh}.honor-dialog .member-head{top:-15px}.honor-row{grid-template-columns:38px 58px minmax(0,1fr) 62px;gap:7px;padding:10px 8px;min-height:80px;border-radius:14px}.honor-row .chat-author{width:58px}.honor-row .profile-avatar{width:43px;height:43px}.honor-position{font-size:13px}.honor-nickname{font-size:14px;line-height:1.4}.honor-value{font-size:17px}.honor-place-1{min-height:92px}.social-profile>.member-head{top:-18px}}

/* Balance the close button with an equal empty column around honor headings. */
.honor-dialog .member-head{display:grid;grid-template-columns:44px minmax(0,1fr) 44px;gap:8px}.honor-dialog .member-head h2{grid-column:2;margin:0;text-align:center;white-space:nowrap;font-size:clamp(12px,3.6vw,30px)}.honor-dialog .member-head .close{grid-column:3;grid-row:1}

/* Account navigation must not swap to a downloaded Korean face after paint. */
.home-root .member-bar,.home-root .member-greeting{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","Apple SD Gothic Neo","Malgun Gothic",sans-serif}

/* Feature access: grouped defaults and explicit per-member exceptions. */
.permission-dialog{width:min(850px,95vw);padding:24px}.permission-intro p{margin:0 0 6px;line-height:1.65;word-break:keep-all}.permission-intro small{color:#a7bacb}.permission-find{display:flex;align-items:flex-end;gap:10px;margin:18px 0}.permission-find label{flex:1;min-width:0;margin:0}.permission-find input{width:100%;box-sizing:border-box;margin-bottom:0;font-size:16px}.permission-find>button{flex:none;min-height:46px}.permission-summary{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:22px 0 14px;flex-wrap:wrap}.permission-summary>strong{font-size:20px;color:#d8fff0}.permission-exceptions{font-size:12px;color:#adddce;padding:6px 10px;border:1px solid #4b7b73;border-radius:999px;background:#163b38}.permission-quick{display:flex;gap:8px;margin-bottom:16px;flex-wrap:wrap}.permission-quick button{flex:1;min-width:0;padding:9px 12px}.permission-group{border:1px solid #355268;border-radius:16px;margin:12px 0;overflow:hidden;background:#112538}.permission-group-head{display:flex;align-items:center;gap:10px;padding:14px 16px;background:linear-gradient(110deg,#203c48,#172b40)}.permission-group-head h3{margin:0;flex:1;font-size:17px;word-break:keep-all}.permission-group-state{font-size:12px;white-space:nowrap;font-weight:700}.permission-group-state.on,.permission-allowed{color:#91e6c8}.permission-group-state.off,.permission-denied{color:#e6b0b9}.permission-group-head button{min-height:34px;padding:5px 10px;font-size:12px;white-space:nowrap}.permission-feature{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 16px;border-top:1px solid #324b60}.permission-feature-copy{min-width:0;flex:1}.permission-feature-copy strong{display:block;font-size:15px;line-height:1.5;word-break:keep-all}.permission-feature-copy small{display:block;font-size:12px;line-height:1.6;margin-top:4px}.permission-choices{display:flex;gap:4px;padding:4px;border:1px solid #3b5268;border-radius:12px;background:#0c1a2b;flex:none}.permission-choices button{min-width:44px;min-height:36px;padding:6px 9px;border:1px solid transparent;background:transparent;color:#a7b7ca;border-radius:8px;font-size:13px}.permission-choices button.selected{background:#23564e;border-color:#6cd2b4;color:#e3fff5;font-weight:700}.permission-choices button.selected[aria-label$="OFF"]{background:#53303e;border-color:#b87b89;color:#ffe4ea}.permission-save{display:grid;grid-template-columns:1fr 1fr;gap:12px;position:sticky;bottom:-24px;background:#141f30;padding:14px 0;margin-top:18px}.permission-save button{width:100%;min-height:46px}.permission-reset{display:block;margin:16px auto;color:#e3b6c0;border-color:#9c6879;background:#362330;padding:10px 16px}.permission-blocked{opacity:.55!important;filter:saturate(.35);cursor:help!important}.permission-dialog button:disabled{cursor:wait}
@media(max-width:600px){.permission-dialog{padding:16px}.permission-group-head{padding:12px;gap:7px}.permission-group-head h3{font-size:16px}.permission-feature{padding:12px;gap:10px;flex-wrap:wrap}.permission-feature-copy{flex-basis:100%}.permission-choices{margin-left:auto;width:100%;box-sizing:border-box}.permission-choices button{flex:1;min-height:40px}.permission-save{bottom:-16px}.permission-quick button{font-size:12px;padding-inline:6px}.permission-find{gap:8px}.permission-find>button{padding-inline:12px}.permission-summary{gap:8px}.permission-group-state{font-size:11px}}
.permission-dialog>.member-head{position:sticky;top:-24px;z-index:4;background:#141f30;padding:10px 0;margin-top:-10px}.permission-dialog>.member-head h2{margin:0}.permission-save{z-index:3}@media(max-width:600px){.permission-dialog>.member-head{top:-16px}}

@media screen{.member-bar button{border:1px solid #527e82;background:linear-gradient(135deg,#294c50,#1d3548);color:#dceff0;border-radius:12px;box-shadow:inset 0 1px 0 #ffffff0c,0 3px 9px #0001;font-weight:700}.member-bar button:hover:not(:disabled){border-color:#8bccb2;background:#305d54}.member-bar button:focus-visible{outline:2px solid #a0dbc3;outline-offset:3px}.member-bar button[data-member-action=admin]{background:linear-gradient(135deg,#355650,#243e4a)}@media(min-width:791px){.member-bar button{box-sizing:border-box;flex:0 0 96px!important;width:96px!important;min-width:96px!important;max-width:96px!important;min-height:44px!important;height:44px!important;padding:9px 8px!important;display:flex;align-items:center;justify-content:center;font-size:13px!important;line-height:1.5}}}
