.profile-editor { max-width:960px; margin:24px auto; padding:24px; border:1px solid #ac915c66; border-radius:10px; background:#101e2b; color:#e5dcc9; font:14px/1.5 "Segoe UI",sans-serif; }
.profile-editor h1 { font:500 30px Georgia,serif; color:#e9d9b4; }
.player-profile-card { display:flex; gap:24px; align-items:center; padding:24px; background:linear-gradient(120deg,#253b49,#13222f); border:1px solid #ab925e55; border-radius:8px; color:#e5dcc9; }
.profile-identity { min-width:0; overflow-wrap:anywhere; }
.profile-identity h3 { color:#ecdab3; font:500 25px Georgia,serif; margin:0 0 10px; }
.profile-identity p { margin:6px 0; font-size:13px; }
.profile-alliance { color:#c3ae7b; }
.profile-public-world { display:flex; align-items:center; flex-wrap:wrap; gap:12px; margin-bottom:16px; }
.profile-public-world select { background:#152a39; color:#eee6d6; border:1px solid #72818a; border-radius:4px; padding:6px; max-width:100%; }
.profile-public-content { min-height:202px; }
.player-profile-link { border:0; padding:0; background:transparent; color:inherit; font:inherit; text-align:left; cursor:pointer; text-decoration:underline; text-underline-offset:3px; }
.player-profile-link:focus-visible { outline:2px solid #d5ba80; outline-offset:3px; }
.profile-composite { position:relative; width:152px; height:152px; flex:0 0 152px; }
.profile-art { display:inline-grid; place-items:center; position:relative; box-sizing:border-box; width:100%; height:100%; overflow:hidden; }
.profile-art img { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; }
.profile-art-fallback { box-sizing:border-box; display:grid; place-items:center; width:100%; height:100%; }
.profile-art-portrait { border-radius:50%; background:radial-gradient(circle,#425d6d,#152a39); color:#c4cfce; font-size:64px; }
.profile-art-frame .profile-art-fallback { border:5px double #af9868; border-radius:50%; box-shadow:inset 0 0 0 4px #0a1828; }
.profile-art-emblem { background:#243746; color:#d8bf88; border:1px solid #ad945f; border-radius:8px 8px 45% 45%; font-size:30px; }
.profile-art.has-art .profile-art-fallback { visibility:hidden; }
.profile-composite > .profile-art-portrait { position:absolute; inset:8%; width:84%; height:84%; }
.profile-composite > .profile-art-frame { position:absolute; inset:0; pointer-events:none; }
.profile-composite > .profile-art-emblem { position:absolute; right:-6px; bottom:0; width:44px; height:48px; }
.player-profile-card.is-compact { padding:12px; gap:14px; margin:12px 0; }
.is-compact .profile-composite { width:76px; height:76px; flex-basis:76px; }
.is-compact .profile-art-portrait { font-size:34px; }
.is-compact .profile-composite > .profile-art-emblem { width:26px; height:30px; font-size:19px; }
.is-compact .profile-identity h3 { font:500 17px Georgia,serif; }
.is-compact .profile-identity p { font-size:12px; }
.profile-world-label { color:#a8bbc7; font-size:12px; margin:10px 0; }
.profile-tabs { display:flex; overflow-x:auto; gap:8px; margin:22px 0 14px; }
.profile-editor button { color:#e7d9b7; background:#1d3343; border:1px solid #8f7d5655; border-radius:6px; padding:12px 18px; min-height:44px; cursor:pointer; }
.profile-editor button:hover { background:#2b4353; }
.profile-editor button:focus-visible { outline:2px solid #e3c787; outline-offset:3px; }
.profile-editor button:disabled { opacity:.5; cursor:wait; }
.profile-tabs [aria-selected=true] { border-color:#c3a66e; background:#304451; }
.profile-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:12px; }
.profile-editor .profile-tile { position:relative; display:flex; flex-direction:column; gap:12px; align-items:center; justify-content:flex-start; font-size:12px; padding:14px; }
.profile-tile .profile-art { width:86px; height:86px; flex:0 0 86px; }
.profile-editor .profile-tile[aria-pressed=true] { border:2px solid #d2b476; background:#2b3e48; }
.profile-check { position:absolute; top:5px; right:8px; color:#e4cb91; }
.profile-controls { display:flex; gap:10px; padding:14px 0; position:sticky; bottom:0; background:#101e2bf5; margin-top:14px; }
.profile-editor [role=status] { min-height:24px; color:#dec895; }
.profile-editor [hidden] { display:none !important; }
.profile-overlay { box-sizing:border-box; width:min(960px,96vw); max-width:96vw; height:auto; max-height:90dvh; padding:0; border:1px solid #ac915c88; border-radius:10px; background:#101e2b; color:#e5dcc9; box-shadow:0 24px 80px #0008; font:14px/1.5 "Segoe UI",sans-serif; overflow:hidden; }
.profile-overlay[open] { display:flex; flex-direction:column; height:fit-content; }
.profile-overlay::backdrop { background:#050d17a8; }
.profile-overlay-heading { display:flex; align-items:center; justify-content:space-between; flex-shrink:0; gap:16px; padding:16px 22px; background:linear-gradient(120deg,#253b49,#13222f); border-bottom:1px solid #ac915c44; }
.profile-overlay-heading h2 { margin:0; font:500 26px Georgia,serif; color:#e9d9b4; }
.profile-overlay-heading button { width:44px; height:44px; border:1px solid #ac915c66; border-radius:6px; background:#192e3e; color:#e1c58a; font-size:26px; cursor:pointer; }
.profile-overlay :focus-visible { outline:2px solid #e3c787; outline-offset:3px; }
.profile-overlay-body { flex:1; min-height:0; overflow-y:auto; overscroll-behavior:contain; padding:20px; scrollbar-width:thin; }
.profile-overlay .profile-editor { margin:0; padding:0; border:0; max-width:none; }
.profile-overlay-status { padding:12px; color:#dac38d; }
@media(max-width:600px) {
 .profile-overlay { width:100vw; max-width:100vw; max-height:96dvh; margin:auto 0 0; border-radius:12px 12px 0 0; }
 .profile-overlay[open] { height:96dvh; }
 .profile-overlay-body { padding:14px; }
 .profile-overlay-heading { padding:12px 14px; }
 .profile-editor { padding:14px; margin:12px 0; }
 .player-profile-card:not(.is-compact) { flex-direction:column; text-align:center; padding:18px; }
 .profile-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
 .profile-controls button { flex:1; padding:12px 8px; }
}
.profile-alliance-link{display:flex;align-items:center;gap:.55rem;max-width:100%;padding:.45rem .6rem;border:1px solid #82704b;border-radius:.4rem;background:#292a27;color:#dcc58d;text-align:left;font:inherit;overflow-wrap:anywhere;cursor:pointer}
.profile-alliance-link:hover{background:#35372f;border-color:#baa471;color:#f0dca8}
.profile-alliance-link:focus-visible{outline:2px solid #dcc58d;outline-offset:3px}
.profile-alliance-link .alliance-crest{width:2rem;height:2rem;flex:0 0 2rem}
.profile-alliance-link>span:last-child{margin-left:auto}
.profile-alliance .btn{white-space:normal;max-width:100%;margin-top:.4rem}
.profile-alliance-status{font-size:.85rem;margin:.5rem 0 0;color:#d4c9ad;overflow-wrap:anywhere}
