/* The name, portrait and disclosure mark are one hit target. */
.profile-trigger,.account-profile-dialog{--profile-scene:url("./profile-observatory-146.webp")}
.profile-trigger{
 appearance:none;position:relative;pointer-events:auto;cursor:pointer;
 border:0;border-radius:5px;background:transparent;color:inherit;
 text-align:start;font:inherit;padding:0;touch-action:manipulation;
}
.profile-trigger::after{
 content:"";display:block;flex:none;width:6px;height:6px;margin-inline:3px;
 border:solid #d4b577;border-width:1.5px 1.5px 0 0;transform:rotate(45deg);
}
.profile-trigger:focus-visible{outline:2px solid #ffdb93;outline-offset:2px}
@media(hover:hover){.profile-trigger:hover{background-color:#dec59117}}
.profile-trigger:active{background-color:#dec59124}
.player-bar .player-title.profile-trigger{width:100%;padding:1px 3px;min-width:0}
.player-bar .profile-trigger::after{margin-left:auto}
.player-bar .profile-trigger [hidden]{display:none}
.player-bar .profile-trigger #playerName{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
[data-ui="touch"] .player-bar .profile-trigger::before{
 content:"";position:absolute;inset-inline:0;top:50%;height:max(44px,100%);transform:translateY(-50%);
}
#socialLobby .camp-id.profile-trigger{max-width:100%;padding:3px 5px 3px 0}

.player-bar .player-title.profile-trigger,#socialLobby .camp-id.profile-trigger{
 background:linear-gradient(100deg,#101e2bf2,#122031d4 50%,#1525355c),var(--profile-scene) 75% 45%/cover;
 border:1px solid #b89c695c;border-inline-end-color:#ccb27eab;color:#fff1cb;
 box-shadow:inset 0 1px #fff3c41c;text-shadow:0 1px 3px #07101f;
}
.player-bar .player-title.profile-trigger{padding-inline:4px}
#socialLobby .camp-id.profile-trigger{padding:5px 12px 5px 5px}
@media(hover:hover){.profile-trigger:hover::after{border-color:#fff2c9}}
/* Profile plate uses the existing portraits and the adventurer's equipped theme. */
dialog.account-profile-dialog{
 --profile-gold:#d9be88;box-sizing:border-box;width:min(710px,calc(100vw - 24px));max-height:calc(100dvh - 20px);
 margin:auto;padding:0;color:#eee8d9;border:1px solid #a98a57;border-image:none;
 border-radius:14px;background:linear-gradient(130deg,#1b302f,#112121 62%,#142326);
 box-shadow:0 18px 60px #020909a8,inset 0 0 0 3px #efca7b0c;overflow:auto;overscroll-behavior:contain;
}
.account-profile-dialog::backdrop{background:#061211b3}
.profile-heading{
 position:sticky;top:0;z-index:4;display:flex;align-items:center;justify-content:space-between;gap:12px;
 padding:5px 9px 5px 19px;background:linear-gradient(105deg,#1a3240,#152331);border-bottom:1px solid #b199645c;
}
.profile-heading h2{margin:0;display:flex;align-items:center;gap:10px;color:#f4e4bd;font:700 18px/1.3 Georgia,serif}
.profile-heading h2::before{content:"✦";color:#daba80;font-size:19px}
.profile-heading .account-close{position:static;display:grid;place-items:center;width:44px;height:44px;background:none;border:0;color:#eedcbb;font:400 25px/1 system-ui}
.account-profile-dialog :focus-visible{outline:2px solid #f5d18e;outline-offset:2px}
.profile-body{padding:16px}
.profile-editable{display:grid;grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);align-items:start;gap:18px}
.profile-summary{min-width:0;border:1px solid #ad905e80;border-radius:9px;overflow:hidden;background:linear-gradient(125deg,#152931,#121e2b 72%)}
.profile-summary .account-cover{
 height:clamp(98px,36dvh,200px);margin:0;border-radius:0;isolation:isolate;overflow:hidden;
 justify-content:flex-start;align-items:flex-end;padding:12px 16px;box-sizing:border-box;
}
.profile-summary .account-cover::before{
 content:"";position:absolute;inset:0;z-index:-1;
 background:linear-gradient(0deg,#0715236e,transparent 35%),var(--profile-scene) center 12%/cover;
 filter:var(--scene-grade,none);
}
.theme-moon{--scene-grade:hue-rotate(32deg) saturate(.82)}
.theme-dawn{--scene-grade:sepia(.65) saturate(1.45) hue-rotate(330deg) brightness(1.14)}
.theme-ocean{--scene-grade:hue-rotate(340deg) saturate(1.3) brightness(1.1)}
.theme-aurora{--scene-grade:hue-rotate(305deg) saturate(1.65) brightness(1.16)}
.theme-starlit{--scene-grade:hue-rotate(18deg) contrast(1.2) saturate(1.22)}
.profile-summary #accountAvatar{width:clamp(61px,15dvh,92px);height:auto;aspect-ratio:1;background-color:#15232ddd}
.profile-summary .account-badge{left:auto;right:12px;top:11px;display:grid;place-items:center;width:26px;height:26px;font-size:18px;color:#ffe6a8;background:#14202bd6;border:1px solid #c8a35d9c;border-radius:50%}
.profile-summary .account-visibility{right:10px;bottom:8px;padding:3px 8px;background:#101e2cda;color:#f7e8c7;font:600 11px/1.4 system-ui;border:1px solid #bf9e5d60}
.profile-summary .account-card-text{padding:12px 16px 10px;border-top:1px solid #c6a56a8c}
.account-card-text h2{margin:0;font:700 clamp(20px,3.2vw,28px)/1.25 Georgia,serif;color:#ffedc9;overflow-wrap:anywhere}
.account-card-text p{margin:6px 0 12px;color:#dae2dd;font-size:14px}
.profile-card-footer{display:flex;align-items:center;justify-content:space-between;gap:8px;flex-wrap:wrap;border-top:1px solid #c2a47141;padding-top:8px}
.profile-card-footer small{color:#d8bf94;overflow-wrap:anywhere}
.profile-edit-toggle{appearance:none;border-radius:5px;border:1px solid #b89b63;background:#e7c891;color:#182527;font:700 13px/1.2 system-ui;padding:8px 12px}
.profile-edit-toggle[aria-expanded=true]{background:#233642;color:#f5dcaf}
.account-profile-dialog #accountProfileForm[hidden]{display:none}
.account-profile-dialog #accountProfileForm{gap:10px;min-width:0}
#accountProfileForm .field label,#accountProfileForm .profile-options label{color:#e0cba3;font-size:13px}
#accountProfileForm .profile-options{gap:6px}
#accountProfileForm .profile-options select{min-width:0;padding-inline:4px}
#accountProfileForm .primary{margin:0;min-height:38px}
#accountSaveStatus:empty{display:none}
.profile-body > .primary{display:block;width:max-content;margin:0 auto 12px}
@media(max-width:540px){.profile-editable{grid-template-columns:1fr}}
@media(max-height:450px) and (min-width:541px){
 .profile-body{padding:10px 14px}
 .profile-heading{padding-block:0}
 .profile-editable{grid-template-columns:minmax(0,.8fr) minmax(0,1.2fr);gap:14px}
}
dialog.account-profile-dialog{scrollbar-width:thin;scrollbar-color:#907c57 #142424}
dialog.account-profile-dialog:has(.profile-summary):not(:has(.profile-editable)){width:min(530px,calc(100vw - 24px))}
