.launch-utilities{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;column-gap:10px;margin-top:6px}
.launch-utilities .language-control{margin:0}
.profile-open{
 display:flex;align-items:center;gap:5px;min-height:36px;max-width:100%;padding:3px 8px;
 border:1px solid #a89160;border-radius:22px;background:#163e34;color:#fff4d9;font:650 .75rem/1.15 system-ui,sans-serif;cursor:pointer
}
.launch-profile-header{
 display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);
 align-items:center;min-height:36px;column-gap:7px;
}
.launch-profile-header>.profile-open{grid-column:1;grid-row:1;justify-self:start;min-width:0}
.launch-profile-header>.launch-crest{grid-column:2;grid-row:1}
#profile-chip-label{min-width:0;white-space:nowrap;overflow:hidden}
.profile-chip-full{display:block;width:max-content;transform-origin:left center}
.profile-mark{width:21px;height:21px;display:grid;place-items:center;border-radius:50%;overflow:hidden;background:#d7aa5d;color:#234239;flex:none}
.profile-mark img{width:100%;height:100%;object-fit:cover}
.profile-mark [hidden],.player-profile [hidden]{display:none}
.player-profile{
 box-sizing:border-box;max-width:min(calc(100vw - 24px),470px);width:100%;max-height:calc(100dvh - 20px);
 padding:14px 19px;border:1px solid #d1aa6a;border-radius:15px;overflow:auto;background:#173d33;color:#fff2ce
}
.player-profile::backdrop{background:#100a09a0}
.player-profile h2{margin:0;font:700 1.65rem Georgia,serif}
.profile-kicker{margin:0 0 3px;color:#ebc480;text-transform:uppercase;font-size:.71rem;letter-spacing:.12em}
.profile-info{display:block;margin:4px 0;color:#f0dbb0;font-size:.78rem}
.profile-fields{display:grid;grid-template-columns:42px minmax(0,1fr) minmax(0,1fr);align-items:end;gap:7px;margin:9px 0}
.profile-large{width:39px;height:39px}
.profile-fields label{display:grid;gap:3px;font-size:.77rem;font-weight:650;min-width:0}
.profile-fields input{font:1rem system-ui,sans-serif;min-width:0;width:100%;border:1px solid #a98e59;border-radius:7px;color:#fff3cc;background:#102f26;padding:6px}
.profile-fields input[type=file]{font-size:.73rem;overflow:hidden}
.profile-actions{display:flex;justify-content:flex-end;gap:8px}
.player-profile button{padding:6px 10px;border:1px solid #d1ad70;border-radius:8px;color:#352012;background:#efc57c;cursor:pointer}
.player-profile .profile-alt{color:#fff1c7;background:#23473a}
.player-profile #profile-remove{grid-column:2 / -1;justify-self:start}
.player-profile :focus-visible,.profile-open:focus-visible{outline:2px solid #ffe4a7;outline-offset:2px}
#profile-status{margin:4px 0;min-height:8px;font-size:.77rem;color:#ffdb9d}
@media (orientation:portrait) and (hover:none) and (pointer:coarse){
 .player-profile[open]{position:fixed;inset:auto;top:50%;left:50%;max-width:min(calc(100dvh - 24px),470px);max-height:calc(100dvw - 24px);margin:0;transform:translate(-50%,-50%) rotate(90deg)}
}
@media (orientation:landscape) and (max-height:550px),(orientation:portrait) and (hover:none) and (pointer:coarse) and (max-width:550px){
 .launch-utilities{margin-top:4px}
 .profile-open{min-height:35px}
}

/* A short landscape editor, with the avatar on its own card and one quiet
   save bar. File-picker labels and descriptions are handled by the app. */
#player-profile.profile-editor{
 --editor-line:#bd8f624f;--editor-ink:#fff1d7;--editor-muted:#d9baac;
 max-width:min(calc(100vw - 24px),480px);padding:12px 16px 10px;border-radius:14px;
 background:radial-gradient(ellipse at 4% 3%,#522e39,#301c2b 66%,#271821);color:var(--editor-ink);
 box-shadow:0 18px 64px #100812c9;
}
#player-profile.profile-editor::backdrop{background:#130910ba}
#player-profile.profile-editor .profile-editor-head{
 display:flex;align-items:center;min-height:34px;padding-inline-start:43px;margin-bottom:8px;
 border-bottom:1px solid var(--editor-line);padding-bottom:6px
}
#player-profile.profile-editor .profile-editor-head h2{font:750 clamp(1.05rem,3.6vmin,1.40rem)/1.15 system-ui,sans-serif;outline:none}
#player-profile.profile-editor > .mg-back-local{
 position:absolute;top:12px;inset-inline-start:16px;margin:0!important;min-width:30px;min-height:30px
}
#player-profile.profile-editor .profile-fields{
 display:grid;grid-template-columns:minmax(108px,.65fr) minmax(0,1.7fr);gap:12px;align-items:stretch;margin:0
}
#player-profile .profile-avatar-card{
 display:grid;justify-items:center;align-content:start;gap:4px;padding:6px;
 min-width:0;border:1px solid var(--editor-line);border-radius:10px;background:#2d1925
}
#player-profile .profile-avatar-card>span{font-size:.72rem;font-weight:730;text-align:center}
#player-profile .profile-avatar-card .profile-large{
 width:clamp(40px,13vmin,62px);height:clamp(40px,13vmin,62px);
 border:2px solid #c29663;background:#5e394b;color:#f3d9a6;box-shadow:0 2px 10px #180a148c
}
#player-profile.profile-editor .profile-avatar-card button{
 grid-column:auto;justify-self:center;min-height:25px;max-width:100%;padding:3px 6px;
 font-size:.69rem;line-height:1.05;text-align:center;white-space:normal;overflow-wrap:anywhere
}
#player-profile.profile-editor #profile-remove{
 border-color:transparent;background:transparent;color:#efbcad;text-decoration:underline;text-underline-offset:2px
}
#player-profile .profile-editor-fields{min-width:0;align-self:center}
#player-profile.profile-editor .profile-editor-fields label{font-size:.79rem}
#player-profile.profile-editor .profile-editor-fields input{
 min-height:35px;background:#291923;border-color:#b58c665e;padding:5px 8px;font-size:.96rem
}
#player-profile.profile-editor .profile-info{color:var(--editor-muted);font-size:.73rem;margin:3px 0 7px}
#player-profile #profile-public-photo-help{
 margin:7px 0 0;padding:5px 7px;border-inline-start:2px solid #c89b64;border-radius:3px;
 background:#dbae6a0d;color:#f0d7c4;font-size:.73rem;font-weight:500;line-height:1.23
}
#player-profile.profile-editor #profile-publish-existing{
 margin:5px 0 0;min-height:29px;padding:3px 8px;max-width:100%;
 font-size:.73rem;line-height:1.16;white-space:normal
}
#player-profile.profile-editor .profile-actions{
 border-top:1px solid var(--editor-line);margin-top:8px;padding-top:7px;
 justify-content:flex-end;justify-content:safe flex-end
}
#player-profile.profile-editor .profile-actions button{
 margin:0;min-height:32px;max-width:68%;padding:4px 9px;font-size:.78rem;font-weight:750;line-height:1.13
}
#player-profile.profile-editor #profile-status:empty{display:none}
@media(orientation:portrait) and (hover:none) and (pointer:coarse){
 #player-profile.profile-editor[open]{max-width:min(calc(100dvh - 25px),480px);max-height:calc(100dvw - 26px)}
}
