/* MuzeLinks-only mobile profile side panels; member-authored widget styles remain unchanged. */
body.muzelinks-brand-v2.muze-profile-page .muze-profile-loader {
  --muze-profile-accent: #4372f4;
  --muze-profile-accent-2: #5c82e9;
  color: #f6f3ff !important;
  background: radial-gradient(circle at 50% 28%, rgba(42,94,236, .27), transparent 38%), radial-gradient(circle at 78% 82%, rgba(80,116,215, .2), transparent 34%), linear-gradient(160deg, #120a28, #1b1137 58%, #110a27) !important;
}
body.muzelinks-brand-v2.muze-profile-page .muze-profile-loader__card {
  border: 1px solid rgba(133,166,255, .26) !important;
  background: linear-gradient(150deg, rgba(35,52,100, .92), rgba(25,15,54, .96)) !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, .13), 0 24px 66px rgba(8,1,29, .46) !important;
}
body.muzelinks-brand-v2.muze-profile-page .muze-profile-loader__brand {
  display: block !important;
  width: 170px !important;
  height: 38px !important;
  margin-inline: auto !important;
  color: transparent !important;
  font-size: 0 !important;
  background: url('./full-logo.png') center / contain no-repeat !important;
}
body.muzelinks-brand-v2.muze-profile-page .muze-profile-loader__brand span { display: none !important; }
body.muzelinks-brand-v2.muze-profile-page .muze-profile-loader__emblem {
  position: relative !important;
  border-color: rgba(101,142,255, .38) !important;
  background: linear-gradient(145deg, #243a76, #271852) !important;
  box-shadow: 0 14px 35px rgba(11,2,39, .4), inset 0 1px rgba(255, 255, 255, .12) !important;
}
body.muzelinks-brand-v2.muze-profile-page .muze-profile-loader__emblem svg { opacity: 0 !important; }
body.muzelinks-brand-v2.muze-profile-page .muze-profile-loader__emblem::after {
  content: '';
  position: absolute;
  inset: 21%;
  background: url('./compact-logo.png') center / contain no-repeat;
}
body.muzelinks-brand-v2.muze-profile-page .muze-profile-loader__card > p { color: #9eb8ff !important; }
body.muzelinks-brand-v2.muze-profile-page .muze-profile-loader__track i { background: linear-gradient(90deg, #3164f1, #64dfef, #7594e9) !important; }
body.muzelinks-brand-v2.muze-profile-page .muze-profile-loader__card > small { color: #a8b9e7 !important; }
@media (max-width: 767px) {
  body.muzelinks-brand-v2.muze-profile-page.ml-profile-drawer-open .muze-profile[data-muze-profile] {
    position: relative;
    z-index: 99950 !important;
  }
  body.muzelinks-brand-v2.muze-profile-page.ml-profile-drawers-ready .muze-profile__content-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
  body.muzelinks-brand-v2.muze-profile-page.ml-profile-drawers-ready .ml-profile-widgets-drawer,
  body.muzelinks-brand-v2.muze-profile-page.ml-profile-drawers-ready .ml-profile-info-drawer {
    position: fixed !important;
    top: var(--ml-profile-drawer-top, 72px) !important;
    bottom: var(--ml-profile-drawer-bottom, 82px) !important;
    left: 0 !important;
    right: auto !important;
    z-index: 99960 !important;
    display: block !important;
    width: min(calc(100vw - 62px), 360px) !important;
    max-width: none !important;
    height: auto !important;
    max-height: none !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 14px 24px !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    border: 1px solid rgba(133,166,255, .45) !important;
    border-left: 0 !important;
    border-radius: 0 23px 23px 0 !important;
    color: #f1ecff !important;
    background: radial-gradient(circle at 8% 0%, rgba(95,135,245, .25), transparent 40%), linear-gradient(155deg, #271c48, #191130 59%, #160f29) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 18px 0 46px rgba(8,2,27, .57) !important;
    transform: translate3d(-106%, 0, 0) !important;
    opacity: .92;
    pointer-events: none !important;
    transition: transform .34s cubic-bezier(.2,.82,.18,1), opacity .25s ease !important;
    -webkit-overflow-scrolling: touch;
  }
  body.muzelinks-brand-v2.muze-profile-page.ml-profile-drawers-ready .ml-profile-widgets-drawer.ml-is-open,
  body.muzelinks-brand-v2.muze-profile-page.ml-profile-drawers-ready .ml-profile-info-drawer.ml-is-open {
    transform: translate3d(0, 0, 0) !important;
    opacity: 1;
    pointer-events: auto !important;
  }
  body.muzelinks-brand-v2.muze-profile-page .ml-profile-drawer-head {
    position: sticky;
    top: 0;
    z-index: 50;
    margin: 0 -14px 16px;
    padding: 19px 16px 16px;
    border-bottom: 1px solid rgba(157,183,255, .2);
    background: linear-gradient(180deg, rgba(44,63,115, .97), rgba(36,25,68, .98));
    box-shadow: 0 9px 24px rgba(10,4,29, .22);
  }
  body.muzelinks-brand-v2.muze-profile-page .ml-profile-drawer-kicker {
    color: #91e4ef;
    font: 850 10px/1.1 Inter, system-ui, sans-serif;
    letter-spacing: .16em;
  }
  body.muzelinks-brand-v2.muze-profile-page .ml-profile-drawer-head > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 5px;
  }
  body.muzelinks-brand-v2.muze-profile-page .ml-profile-drawer-head h2 {
    margin: 0;
    color: #fff;
    font: 850 22px/1.2 Inter, system-ui, sans-serif;
    letter-spacing: -.035em;
  }
  body.muzelinks-brand-v2.muze-profile-page .ml-profile-drawer-head p {
    margin: 7px 0 0;
    color: #becbed;
    font: 500 12px/1.4 Inter, system-ui, sans-serif;
  }
  body.muzelinks-brand-v2.muze-profile-page .ml-profile-drawer-head [data-ml-profile-close] {
    display: grid;
    place-items: center;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 0;
    border: 1px solid rgba(185,204,255, .34);
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(145deg, #384e89, #2b3b68);
    font: 400 26px/1 system-ui, sans-serif;
    cursor: pointer;
  }
  body.muzelinks-brand-v2.muze-profile-page .ml-profile-info-content {
    display: grid;
    align-content: start;
    gap: 14px;
  }
  body.muzelinks-brand-v2.muze-profile-page .ml-profile-info-content > * {
    min-width: 0;
    margin: 0 !important;
  }
  body.muzelinks-brand-v2.muze-profile-page .ml-profile-top-friends {
    position: relative;
    z-index: 1;
    margin: 12px 12px 16px;
    padding: 3px;
    border: 1px solid rgba(118,155,255, .28);
    border-radius: 20px;
    background: linear-gradient(145deg, rgba(66,97,183, .18), rgba(38,21,87, .24));
    box-shadow: 0 14px 32px rgba(10,3,32, .19);
  }
  body.muzelinks-brand-v2.muze-profile-page .ml-profile-top-friends:empty { display: none; }
  body.muzelinks-brand-v2.muze-profile-page .ml-profile-top-friends > *,
  body.muzelinks-brand-v2.muze-profile-page .ml-profile-top-friends .muze-profile__top-friends {
    min-width: 0;
    margin: 0 !important;
  }
  body.muzelinks-brand-v2.muze-profile-page .ml-profile-top-friends .muze-profile__people-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }
  body.muzelinks-brand-v2.muze-profile-page .ml-profile-top-friends .muze-profile__person,
  body.muzelinks-brand-v2.muze-profile-page .ml-profile-top-friends .muze-profile__person a { min-width: 0 !important; }
  body.muzelinks-brand-v2.muze-profile-page .ml-profile-top-friends .muze-profile__person a {
    display: grid !important;
    justify-items: center;
    gap: 5px;
    text-align: center;
  }
  body.muzelinks-brand-v2.muze-profile-page .ml-profile-top-friends .muze-profile__person figure {
    width: 58px !important;
    height: 58px !important;
    margin: 0 auto !important;
  }
  body.muzelinks-brand-v2.muze-profile-page .ml-profile-top-friends .muze-profile__friend-copy,
  body.muzelinks-brand-v2.muze-profile-page .ml-profile-top-friends .muze-profile__friend-copy :is(h3,p) {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  body.muzelinks-brand-v2.muze-profile-page.ml-profile-drawers-ready .ml-profile-widgets-drawer > .muze-widget-grid--left:not(.is-empty) {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px !important;
    width: 100% !important;
    min-width: 0 !important;
    margin: 0 0 14px !important;
  }
  body.muzelinks-brand-v2.muze-profile-page.ml-profile-drawers-ready .ml-profile-widgets-drawer > .muze-widget-grid--left.is-empty {
    display: none !important;
  }
  body.muzelinks-brand-v2.muze-profile-page.ml-profile-drawers-ready .ml-profile-widgets-drawer > .muze-polaroid-page-layer {
    position: relative !important;
    inset: auto !important;
    display: grid !important;
    justify-items: center;
    gap: 16px;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 4px 0 0 !important;
    pointer-events: auto !important;
  }
  body.muzelinks-brand-v2.muze-profile-page.ml-profile-drawers-ready .ml-profile-widgets-drawer > .muze-polaroid-page-layer > .muze-polaroid {
    position: relative !important;
    inset: auto !important;
    left: auto !important;
    top: auto !important;
    width: min(100%, 260px) !important;
    max-width: 260px !important;
    transform: rotate(var(--polaroid-turn, 0deg)) !important;
    margin: 0 !important;
  }
  body.muzelinks-brand-v2.muze-profile-page .ml-profile-widgets-drawer.ml-profile-widgets-empty::after {
    content: 'No widgets on this profile yet.';
    display: block;
    padding: 22px 14px;
    border: 1px dashed rgba(163,185,247, .34);
    border-radius: 14px;
    color: #b9c4e3;
    text-align: center;
  }
  body.muzelinks-brand-v2.muze-profile-page .ml-profile-drawer-backdrop {
    position: fixed;
    inset: 0;
    z-index: 99945;
    display: block;
    width: 100%;
    min-height: 100%;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: linear-gradient(90deg, rgba(25,6,81, .18), rgba(29,75,201, .34)) !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    opacity: 0;
    pointer-events: none;
    transition: opacity .28s ease;
  }
  body.muzelinks-brand-v2.muze-profile-page .ml-profile-drawer-backdrop.ml-is-open {
    opacity: 1;
    pointer-events: auto;
  }
  body.muzelinks-brand-v2.muze-profile-page .ml-profile-drawer-controls {
    position: fixed;
    left: max(0px, env(safe-area-inset-left));
    top: clamp(calc(var(--ml-profile-drawer-top, 72px) + 12px), calc(50dvh - 51px), calc(100dvh - var(--ml-profile-drawer-bottom, 82px) - 112px));
    bottom: auto;
    z-index: 99965;
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 4px 4px 4px 0;
    border: 1px solid rgba(158,183,251, .4);
    border-left: 0;
    border-radius: 0 16px 16px 0;
    background: linear-gradient(145deg, rgba(42,60,108, .96), rgba(29,19,58, .97));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 13px 30px rgba(10,3,29, .38);
    transition: opacity .2s ease, transform .2s ease;
  }
  body.muzelinks-brand-v2.muze-profile-page .ml-profile-drawer-controls button {
    position: relative;
    display: inline-grid;
    place-items: center;
    align-items: center;
    width: 44px;
    min-width: 0;
    height: 44px;
    min-height: 44px;
    padding: 8px;
    border: 0;
    border-radius: 0 10px 10px 0;
    color: #efeaff;
    background: transparent;
    cursor: pointer;
  }
  body.muzelinks-brand-v2.muze-profile-page .ml-profile-drawer-controls button:first-child {
    background: linear-gradient(180deg, rgba(255,255,255,.2), transparent 48%), linear-gradient(112deg, #2c51b6, #5b78c8 72%, #824cb2);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 5px 13px rgba(34,15,91, .26);
  }
  body.muzelinks-brand-v2.muze-profile-page .ml-profile-drawer-controls svg {
    width: 20px;
    height: 20px;
  }
  body.muzelinks-brand-v2.muze-profile-page .ml-profile-drawer-controls button::after {
    content: '›';
    position: absolute;
    right: 2px;
    top: 50%;
    translate: 0 -50%;
    color: #d2c3ff;
    font: 800 15px/1 system-ui, sans-serif;
    opacity: .88;
  }
  body.muzelinks-brand-v2.muze-profile-page .ml-profile-drawer-controls button:focus-visible,
  body.muzelinks-brand-v2.muze-profile-page .muze-contact-dock__mobile-toggle:focus-visible { outline: 2px solid #91f2ff !important; outline-offset: 2px; }
  body.muzelinks-brand-v2.muze-profile-page.ml-profile-drawer-open {
    overflow: hidden !important;
  }
  body.muzelinks-brand-v2.muze-profile-page.ml-profile-drawer-open .ml-profile-drawer-controls,
  body.muzelinks-brand-v2.muze-profile-page.ml-profile-contact-open .ml-profile-drawer-controls,
  body.muzelinks-brand-v2.muze-profile-page.ml-profile-placing .ml-profile-drawer-controls {
    opacity: 0;
    pointer-events: none;
    transform: translateY(6px);
  }
  body.muzelinks-brand-v2.muze-profile-page.ml-profile-drawer-open .muze-contact-dock__mobile-toggle {
    opacity: 0 !important;
    pointer-events: none !important;
  }
  body.muzelinks-brand-v2.muze-profile-page.ml-profile-drawers-ready .muze-contact-dock__mobile-toggle {
    position: fixed !important;
    left: auto !important;
    right: max(0px, env(safe-area-inset-right)) !important;
    top: clamp(calc(var(--ml-profile-drawer-top, 72px) + 12px), calc(50dvh - 22px), calc(100dvh - var(--ml-profile-drawer-bottom, 82px) - 56px)) !important;
    bottom: auto !important;
    z-index: 99965 !important;
    display: grid !important;
    place-items: center !important;
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    padding: 8px !important;
    border: 1px solid rgba(158,183,251, .4) !important;
    border-right: 0 !important;
    border-radius: 16px 0 0 16px !important;
    color: #efeaff !important;
    background: linear-gradient(155deg, #2b4da9, #506ec0 68%, #7c4aa7) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), -8px 9px 24px rgba(10,3,29, .38) !important;
  }
  body.muzelinks-brand-v2.muze-profile-page.ml-profile-drawers-ready .muze-contact-dock__mobile-toggle svg { width: 20px !important; height: 20px !important; }
  body.muzelinks-brand-v2.muze-profile-page.ml-profile-drawers-ready .muze-contact-dock__mobile-toggle::after {
    content: '‹';
    position: absolute;
    left: 2px;
    top: 50%;
    translate: 0 -50%;
    color: #d2c3ff;
    font: 800 15px/1 system-ui, sans-serif;
  }
  body.muzelinks-brand-v2.muze-profile-page .muze-contact-dock__rail > header .ml-contact-mobile-close {
    display: grid !important;
    place-items: center;
    order: 3;
    width: 40px !important;
    min-width: 40px !important;
    height: 40px !important;
    min-height: 40px !important;
    padding: 0 !important;
    border: 1px solid rgba(149,177,255, .44) !important;
    border-radius: 12px !important;
    color: #efeaff !important;
    background: linear-gradient(145deg, #3252ab, #344a87) !important;
    box-shadow: inset 0 1px rgba(255, 255, 255, .18), 0 6px 14px rgba(14,4,44, .32) !important;
  }
  body.muzelinks-brand-v2.muze-profile-page .muze-contact-dock__rail > header .ml-contact-mobile-close svg { width: 19px; height: 19px; }
  body.muzelinks-brand-v2.muze-profile-page .ml-profile-placement-guide[hidden] { display: none !important; }
  body.muzelinks-brand-v2.muze-profile-page .ml-profile-placement-guide {
    position: fixed;
    top: calc(var(--ml-profile-drawer-top, 72px) + 3px);
    left: 10px;
    right: 10px;
    z-index: 100250;
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 50px;
    padding: 8px 9px 8px 12px;
    border: 1px solid rgba(141,171,255, .58);
    border-radius: 14px;
    color: #f3efff;
    background: linear-gradient(115deg, rgba(22,46,113, .97), rgba(45,29,91, .97));
    box-shadow: 0 12px 30px rgba(13,4,40, .4);
    font: 700 12px/1.3 Inter, system-ui, sans-serif;
  }
  body.muzelinks-brand-v2.muze-profile-page .ml-profile-placement-guide > span { color: #8de4ef; font-size: 18px; }
  body.muzelinks-brand-v2.muze-profile-page .ml-profile-placement-guide strong { flex: 1; min-width: 0; }
  body.muzelinks-brand-v2.muze-profile-page .ml-profile-placement-guide button {
    flex: none;
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid rgba(179,199,255, .35);
    border-radius: 9px;
    color: #fff;
    background: rgba(255, 255, 255, .1);
    font: 800 11px/1 Inter, system-ui, sans-serif;
  }
}
@media (max-width: 360px) {
  body.muzelinks-brand-v2.muze-profile-page .ml-profile-drawer-controls button { width: 44px; }
  body.muzelinks-brand-v2.muze-profile-page .ml-profile-top-friends .muze-profile__person figure { width: 50px !important; height: 50px !important; }
}
@media (prefers-reduced-motion: reduce) {
  body.muzelinks-brand-v2.muze-profile-page .ml-profile-widgets-drawer,
  body.muzelinks-brand-v2.muze-profile-page .ml-profile-info-drawer,
  body.muzelinks-brand-v2.muze-profile-page .ml-profile-drawer-backdrop,
  body.muzelinks-brand-v2.muze-profile-page .ml-profile-drawer-controls { transition: none !important; }
}

/* Keep the move hit area comfortable while the visible control stays off the art. */
body.muzelinks-brand-v2.muze-profile-page .muze-polaroid.has-move-control > footer {
  min-height: 38px;
  padding-right: 38px;
}
body.muzelinks-brand-v2.muze-profile-page .muze-polaroid.has-move-control .muze-polaroid__tools {
  top: auto !important;
  right: 7px !important;
  bottom: 7px !important;
  max-width: 38px !important;
}
body.muzelinks-brand-v2.muze-profile-page .muze-polaroid__tools .muze-polaroid__drag {
  width: 38px !important;
  min-width: 38px !important;
  max-width: 38px !important;
  height: 38px !important;
  min-height: 38px !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}
body.muzelinks-brand-v2.muze-profile-page .muze-polaroid__drag::before { inset: 6px !important; border-radius: 8px !important; }
body.muzelinks-brand-v2.muze-profile-page .muze-polaroid__drag svg { width: 14px !important; height: 14px !important; }
@media (max-width: 767px), (pointer: coarse) {
  body.muzelinks-brand-v2.muze-profile-page .muze-sticky-note header { padding-right: 38px !important; }
  body.muzelinks-brand-v2.muze-profile-page .muze-sticky-note__drag {
    display: grid !important;
    place-items: center !important;
    position: absolute !important;
    top: 2px !important;
    right: 2px !important;
    width: 42px !important;
    min-width: 42px !important;
    height: 42px !important;
    min-height: 42px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }
  body.muzelinks-brand-v2.muze-profile-page .muze-sticky-note__drag::before {
    content: '';
    position: absolute;
    inset: 8px;
    border: 1px solid rgba(57, 42, 31, .22);
    border-radius: 8px;
    background: rgba(255, 255, 255, .72);
    box-shadow: 0 3px 8px rgba(68, 43, 20, .12);
  }
  body.muzelinks-brand-v2.muze-profile-page .muze-sticky-note__drag svg { position: relative; z-index: 1; width: 14px !important; height: 14px !important; }
  body.muzelinks-brand-v2.muze-profile-page .muze-sticky-note__drag span { display: none !important; }
}
