#academy-profile-control {display:flex;align-items:center;gap:6px}
.academy-member-link {display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:36px;padding:0 10px;color:var(--nav-text);border-radius:18px;text-decoration:none;font-size:13px;font-weight:600}
.academy-member-link:hover {background:var(--nav-selected)}
.academy-member-link svg {width:17px;height:17px}
.header-tools #academy-entry:empty{display:none}
.profile-staff-entry{justify-self:start;color:var(--nav-text);font-size:13px}
.profile-member-role {margin:4px 0 0;color:var(--profile-muted);font-size:13px}
.profile-binding-decision {display:flex;align-items:center;gap:8px;flex-wrap:wrap;padding:12px 15px;border:1px solid var(--line);border-radius:12px;background:var(--reading-sheet);color:var(--ink);font:500 13px/1.45 var(--academy-font)}
.profile-binding-decision p {flex-basis:100%;margin:0}
.profile-binding-decision button {padding:7px 11px;border:1px solid var(--line);border-radius:8px;background:var(--reading-sheet);color:inherit;font:inherit;cursor:pointer}
.profile-binding-decision button:hover {background:var(--nav-selected)}
@media(max-width:1100px){.academy-member-link {padding:0 8px;gap:4px}}
.academy-profile-trigger {
  display:grid;place-items:center;width:38px;height:38px;flex:none;overflow:hidden;
  padding:0;border:1px solid var(--nav-line);border-radius:50%;background:var(--nav-selected);
  color:var(--nav-text);font-size:13px;font-weight:670;line-height:1;
}
.academy-profile-trigger:hover {border-color:var(--accent)}
.academy-profile-trigger svg {width:18px;height:18px;stroke-width:1.7}
.academy-profile-trigger img,.profile-photo-frame img {display:block;width:100%;height:100%;object-fit:cover}
#academy-profile-dialog {
  --profile-paper:#fdfcff;--profile-header:#efebfb;--profile-sheen:#e4dcfc;
  --profile-avatar:#e5dbff;--profile-avatar-ink:#5f4092;--profile-text:#282237;
  --profile-muted:#645d73;--profile-line:#e2ddea;--profile-input:#fff;
  --profile-accent:#6345a5;--profile-solid:#6343a3;--profile-error:#a33358;
  position:fixed;inset:0;width:min(458px,calc(100% - 28px));max-width:none;
  max-height:calc(100dvh - 28px);height:fit-content;box-sizing:border-box;margin:auto;padding:0;
  overflow:auto;overscroll-behavior:contain;border:1px solid var(--profile-line);border-radius:24px;
  color:var(--profile-text);background:var(--profile-paper);box-shadow:0 24px 84px #1712254a;
  font-family:var(--academy-font);
}
:root[data-theme=dark] #academy-profile-dialog {
  --profile-paper:#24212d;--profile-header:#322c44;--profile-sheen:#403153;
  --profile-avatar:#514164;--profile-avatar-ink:#e6d6ff;--profile-text:#f4f0fb;
  --profile-muted:#c3bccc;--profile-line:#45404f;--profile-input:#2b2734;
  --profile-accent:#d2b7fa;--profile-solid:#7251a8;--profile-error:#ffadc3;
}
#academy-profile-dialog::backdrop {background:#18132575;backdrop-filter:blur(5px)}
.academy-profile-form {position:relative;margin:0;padding:0}
.academy-profile-form p,.academy-profile-form h2 {margin:0}
.profile-identity {
  display:flex;align-items:center;gap:16px;padding:26px 50px 25px 27px;
  border-bottom:1px solid var(--profile-line);
  background:radial-gradient(ellipse at 100% 0%,var(--profile-sheen),transparent 68%),var(--profile-header);
}
.profile-dismiss {
  position:absolute;z-index:1;top:8px;right:8px;display:grid;place-items:center;
  width:42px;height:42px;padding:0;border:0;border-radius:50%;background:transparent;color:var(--profile-muted);
}
.profile-dismiss:hover {color:var(--profile-text);background:color-mix(in srgb,var(--profile-paper) 60%,transparent)}
.profile-dismiss svg {width:18px;height:18px;stroke-width:1.7}
.profile-avatar-edit {position:relative;flex:none;margin:0;padding:0;border:0;border-radius:23px;background:transparent}
.profile-photo-frame {
  display:grid;place-items:center;width:62px;height:62px;box-sizing:border-box;overflow:hidden;border-radius:21px;
  border:1px solid color-mix(in srgb,var(--profile-accent) 20%,var(--profile-avatar));
  color:var(--profile-avatar-ink);background:var(--profile-avatar);font:650 20px/1 var(--academy-font);
}
.profile-photo-frame svg {width:27px;height:27px;stroke-width:1.5}
.profile-identity-text {min-width:0}
#academy-profile-title {
  color:var(--profile-text);font:670 clamp(21px,3.8vw,26px)/1.15 var(--academy-font);
  letter-spacing:-.035em;text-wrap:balance;
}
.profile-photo-actions {display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.profile-photo-actions button {
  padding:5px 0 1px;border:0;border-radius:2px;background:transparent;color:var(--profile-accent);
  font:550 13px/1.4 var(--academy-font);
}
.profile-photo-actions button:hover {text-decoration:underline;text-underline-offset:3px}
.profile-fields {display:grid;gap:16px;padding:21px 27px}
#academy-profile-intro {margin:0 0 1px;color:var(--profile-muted);font:450 14px/1.5 var(--academy-font)}
.academy-profile-form label {display:grid;gap:6px;color:var(--profile-text);font-size:13px;font-weight:600}
.academy-profile-form label input {
  box-sizing:border-box;width:100%;min-width:0;height:45px;padding:8px 13px;border:1px solid var(--profile-line);
  border-radius:11px;outline:0;background:var(--profile-input);color:var(--profile-text);
  font:450 16px/1.2 var(--academy-font);transition:border-color .16s,box-shadow .16s;
}
.academy-profile-form input[inputmode=numeric] {font-variant-numeric:tabular-nums;letter-spacing:.04em}

.academy-profile-form label input::placeholder {color:var(--profile-muted);opacity:.8}
.profile-form-error {color:var(--profile-error);font-size:13px;line-height:1.4}
.profile-form-actions {
  display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:13px 26px 17px;border-top:1px solid var(--profile-line);
}
.profile-form-actions button {
  min-height:44px;padding:8px 16px;border:1px solid var(--profile-line);border-radius:12px;background:transparent;
  color:var(--profile-text);font:600 14px/1.25 var(--academy-font);
}
.profile-form-actions button[type=submit] {border-color:transparent;background:var(--profile-solid);color:white}
.profile-form-actions button:hover {filter:brightness(1.08)}
.academy-profile-form button:disabled {opacity:.55;cursor:default}
#academy-profile-dialog :is(button,input):focus-visible,.academy-profile-trigger:focus-visible {outline:2px solid var(--profile-accent,var(--accent));outline-offset:2px}
#academy-profile-dialog label input:focus-visible,#academy-profile-title:focus {outline:0}
@media (max-width:480px) {
  .academy-profile-trigger {width:34px;height:34px}
  #academy-profile-dialog {border-radius:20px}
  .profile-identity {padding:22px 39px 20px 20px;gap:13px}
  .profile-photo-frame {width:52px;height:52px;border-radius:17px}
  .profile-fields {padding:18px 19px;gap:14px}
  .profile-form-actions {padding:13px 19px}
}
@media (prefers-reduced-motion:reduce) {.academy-profile-form input {transition:none}}
