[data-profile-ready] [data-profile-fallback] { display: none !important; }
.profile-menu {
  --profile-ink: #17334c;
  --profile-muted: #465d72;
  --profile-surface: #fff;
  --profile-raised: #edf5fc;
  --profile-border: #bad0e5;
  --profile-primary: #1b518a;
  --profile-focus: #2e6fae;
  --profile-error: #a72425;
  --profile-good: #27614d;
  position: relative;
  flex: 0 0 auto;
  color: var(--profile-ink);
  font-family: inherit;
}
.profile-menu[data-profile-appearance="dark"] {
  --profile-ink: #f4f9ff;
  --profile-muted: #b8cde2;
  --profile-surface: #172f4b;
  --profile-raised: #234463;
  --profile-border: #4c7197;
  --profile-primary: #28669e;
  --profile-focus: #a8d4ff;
  --profile-error: #ffac9d;
  --profile-good: #9bd6b0;
}
.profile-menu :where(button, a, input, select):focus-visible {
  outline: 2px solid var(--profile-focus);
  outline-offset: 2px;
}
.profile-menu svg {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.profile-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 4px 8px 4px 5px;
  border: 1px solid var(--profile-border);
  border-radius: 10px;
  background: var(--profile-surface);
  color: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.profile-trigger:hover, .profile-trigger[aria-expanded="true"] { background: var(--profile-raised); }
.profile-trigger-name {
  max-width: 135px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 13px;
  font-weight: 700;
}
.profile-chevron { display: flex; }
.profile-avatar {
  --profile-avatar-fill: #275d99;
  position: relative;
  display: inline-grid;
  flex: none;
  width: 32px;
  height: 32px;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: var(--profile-avatar-fill);
  color: #fff;
  font-size: 12px;
  font-weight: 750;
  line-height: 1;
}
[data-color="teal"] .profile-avatar { --profile-avatar-fill: #17725f; }
[data-color="purple"] .profile-avatar { --profile-avatar-fill: #6b4ba1; }
[data-color="amber"] .profile-avatar { --profile-avatar-fill: #92560c; }
.profile-avatar img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-access {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 4px;
  border-radius: 20px;
  padding: 3px 7px;
  background: var(--profile-raised);
  color: var(--profile-muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.3;
}
.profile-access[data-state="unlocked"], .profile-access[data-state="unlimited"] { color: var(--profile-good); }
.profile-access svg { width: 14px; height: 14px; }
.profile-panel {
  position: absolute;
  z-index: 12;
  top: calc(100% + 8px);
  right: 0;
  width: min(300px, calc(100vw - 40px));
  max-height: calc(100vh - 80px);
  max-height: calc(100dvh - 80px);
  overflow: auto;
  padding: 10px;
  border: 1px solid var(--profile-border);
  border-radius: 14px;
  background: var(--profile-surface);
  box-shadow: 0 12px 32px #0e294033;
}
.profile-identity, .profile-access-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
}
.profile-identity .profile-avatar { width: 43px; height: 43px; font-size: 15px; }
.profile-identity div, .profile-editor-heading div { min-width: 0; }
.profile-identity :is(strong,p) { overflow-x: auto; white-space: nowrap; }
.profile-identity strong { display: block; font-size: 15px; }
.profile-identity p, .profile-editor-heading p, .profile-access-row > span:last-child {
  color: var(--profile-muted);
  font-size: 13px;
  overflow-wrap: anywhere;
}
.profile-access-row { border-bottom: 1px solid var(--profile-border); padding-bottom: 12px; }
.profile-links { display: grid; padding-top: 5px; }
.profile-links :is(a:not(.portal-link), button) {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 6px 8px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--profile-ink);
  font: inherit;
  font-size: 14px;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}
.profile-links :is(a:not(.portal-link), button):hover { background: var(--profile-raised); }
.profile-destinations {
  container: portal-row / inline-size;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(4.5rem, 100%), 1fr));
  gap: 6px;
  padding: 5px 0 10px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--profile-border);
}
.profile-destinations > a:not(.portal-link) {
  --destination-accent: #a7d6ff;
  display: grid;
  grid-template-rows: 32px minmax(1.35em, auto);
  justify-items: center;
  align-items: center;
  gap: 5px;
  padding: 7px 3px 6px;
  border: 1px solid var(--profile-border);
  background: var(--profile-raised);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  white-space: nowrap;
}
.profile-destinations > a[hidden] { display: none; }
.profile-destinations > a:not(.portal-link):hover {
  border-color: var(--profile-focus);
  background: var(--profile-surface);
}
.profile-destinations > .portal-link--library { width: 100%; }
.profile-destinations [data-admin-link] { --destination-accent: #d9ceff; }
.profile-destination-art {
  display: grid;
  place-items: center;
  width: 36px;
  height: 32px;
  border: 1px solid #6687a8;
  border-radius: 7px;
  background: linear-gradient(155deg, #315677, #102540 68%);
  box-shadow: inset 0 1px #d5eaff4d, 0 2px 2px #03112430;
  color: var(--destination-accent);
}
.profile-destination-art svg {
  width: 21px;
  height: 21px;
}
.profile-editor {
  width: min(450px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  border: 1px solid var(--profile-border);
  border-radius: 16px;
  padding: clamp(15px, 4vw, 24px);
  background: var(--profile-surface);
  color: var(--profile-ink);
}
.profile-editor::backdrop { background: #0a1d36a8; }
.profile-form { display: grid; gap: 9px; }
.profile-form :is(input, select, button) { font: inherit; }
.profile-editor-heading, .profile-photo-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.profile-editor-heading { justify-content: space-between; margin-bottom: 7px; }
.profile-editor-heading h2 { font-size: 22px; line-height: 1.3; }
.profile-photo-row {
  align-items: center;
  border: 1px solid var(--profile-border);
  border-radius: 10px;
  padding: 10px;
}
.profile-photo-row > div { min-width: 0; }
.profile-photo-row .profile-avatar { width: 48px; height: 48px; font-size: 17px; }
.profile-photo-row p { margin: 0; color: var(--profile-muted); font-size: 12px; }
.profile-form label { color: var(--profile-ink); font-size: 14px; font-weight: 700; }
.profile-form :is(input[type="text"], select) {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--profile-border);
  border-radius: 8px;
  background: var(--profile-surface);
  color: var(--profile-ink);
  padding: 7px 10px;
  font-size: 16px;
}
.profile-form input[type="file"] { width: 100%; min-height: 44px; font-size: 13px; }
.profile-form input::file-selector-button, .profile-secondary, .profile-primary {
  min-height: 44px;
  border: 1px solid var(--profile-border);
  border-radius: 8px;
  padding: 6px 10px;
  background: var(--profile-raised);
  color: var(--profile-ink);
  cursor: pointer;
}
.profile-form input::file-selector-button { margin-right: 6px; }
.profile-primary { background: var(--profile-primary); color: #fff; }
.profile-form :disabled { opacity: .6; cursor: default; }
.profile-editor-actions { display: flex; justify-content: flex-end; }
.profile-remove {
  min-height: 44px;
  border: 0;
  padding: 0;
  background: none;
  color: var(--profile-error);
  text-decoration: underline;
  cursor: pointer;
}
.profile-status { margin: 0; color: var(--profile-muted); font-size: 13px; }
.profile-status[data-error="true"] { color: var(--profile-error); }
@media (max-width: 720px) {
  .profile-trigger-name { display: none; }
}
@media (max-width: 490px) {
  .profile-trigger { gap: 4px; }
  .profile-trigger .profile-access { padding-inline: 4px; }
  .profile-trigger .profile-access [data-access] { display: none; }
  .profile-chevron svg { width: 12px; height: 12px; }
  .profile-panel { width: min(300px, calc(100vw - 48px)); }
}
@media (max-width: 360px) {
  .profile-trigger { gap: 3px; padding-inline: 4px; }
  .profile-trigger .profile-avatar { width: 28px; height: 28px; }
  .profile-chevron { display: none; }
}
