.player-profile-dialog {
  width: min(500px,calc(100% - 20px));
  max-height: min(92svh,810px);
  overflow: hidden;
  border: 1px solid #65705c;
  border-radius: 7px;
  background: #1c231d;
  box-shadow: 0 20px 80px #080d09aa;
}
.player-profile-dialog[open] { display:flex; flex-direction:column; }
.player-profile-dialog .dialog-header { flex:none; padding:8px 16px; }
.player-profile-dialog .dialog-header h2 { margin:0; font-size:24px; }
.player-profile-dialog .dialog-close { width:40px; height:40px; font:24px/1 var(--sans); }
.pf-scroll { overflow:auto; overscroll-behavior:contain; scrollbar-color:#65705d #1a211c; }
.pf-banner, .pf-crest-choice { --pf-color:#e8c47d; }
.pf-banner[data-emblem="vanguard"], .pf-crest-choice[data-emblem="vanguard"] { --pf-color:#ffc09b; }
.pf-banner[data-emblem="sentinel"], .pf-crest-choice[data-emblem="sentinel"] { --pf-color:#a7dbe5; }
.pf-banner {
  min-height:112px; padding:18px 22px; display:flex; align-items:center; gap:13px; isolation:isolate;
  position:relative; overflow:hidden; background:#30392e;
}
.pf-banner::before,.pf-banner::after { content:""; position:absolute; inset:0; z-index:-1; }
.pf-banner::before { background:url("assets/doctrines/field-issue.webp") center 36% / cover; }
.pf-banner[data-emblem="vanguard"]::before { background-image:url("assets/doctrines/vanguard.webp"); }
.pf-banner[data-emblem="sentinel"]::before { background-image:url("assets/doctrines/sentinel.webp"); }
.pf-banner::after { background:linear-gradient(90deg,#101810ef,#101810b8 48%,#10181033 89%); }
.pf-badge { display:grid; place-items:center; flex:none; width:55px; height:60px; border:1px solid var(--pf-color); border-radius:5px; background:#151d19cc; color:var(--pf-color); }
.pf-badge .profile-crest { width:41px; height:41px; }
.pf-banner h3 { margin:0; color:#fff9e8; word-break:break-word; font:700 clamp(26px,7vw,34px)/1 "Field Condensed",var(--sans); text-shadow:0 1px 5px #0008; }
.pf-banner p { margin:5px 0 0; color:var(--pf-color); font:600 13px/1.2 var(--sans); }
.pf-nav { display:flex; border-bottom:1px solid #475141; padding:0 16px; gap:15px; background:#232c24; }
.pf-nav button { padding:0 3px; min-height:43px; border-bottom:2px solid transparent; color:#bec8b7; font-weight:600; }
.pf-nav button[aria-pressed="true"] { color:#f2cf87; border-color:#e9bd73; }
.pf-status { position:sticky; top:0; z-index:1; padding:8px 16px; margin:0; font-size:13px; line-height:1.4; color:#e9edda; background:#2a3829; border-bottom:1px solid #475745; }
.pf-status:empty { display:none; } .pf-status[data-error] { background:#422e24; color:#ffe0ca; }
.pf-body { padding:17px 20px 20px; }
.pf-body form { display:grid; gap:8px; }
.pf-body form>label, .pf-body legend, [data-pf="recovery-box"] label { display:block; color:#e3e8d9; font:650 13px/1.38 var(--sans); }
.pf-body input:not([type="radio"]) { box-sizing:border-box; display:block; width:100%; min-width:0; min-height:44px; padding:9px 12px; color:#f3f3e6; border:1px solid #54604f; border-radius:4px; background:#151d17; font:16px/1.3 var(--sans); }
.pf-body input:focus-visible { outline:2px solid var(--amber); outline-offset:1px; }
.pf-body fieldset { border:0; margin:7px 0; padding:0; min-width:0; }
.pf-body legend { padding:0; margin-bottom:7px; }
.pf-crests { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:7px; }
.pf-crest-choice { position:relative; cursor:pointer; display:flex; justify-content:center; align-items:center; gap:7px; min-height:53px; border:1px solid #4e584f; border-radius:4px; background:#283128; font:700 16px/1.1 "Field Condensed",var(--sans); }
.pf-crest-choice input { opacity:0; margin:0; position:absolute; inset:0; width:100%; height:100%; cursor:pointer; }
.pf-crest-choice .profile-crest { width:27px; height:27px; color:var(--pf-color); }
.pf-crest-choice:has(input:checked) { border-color:var(--pf-color); color:var(--pf-color); box-shadow:inset 0 -2px var(--pf-color); background:#343d30; }
.pf-crest-choice:has(input:focus-visible) { outline:2px solid white; outline-offset:2px; }
.player-profile-dialog .pf-body button { min-height:42px; }
.pf-body form>.primary-button,.pf-body form>.secondary-button { justify-self:start; padding-inline:17px; }
.pf-transfer, .pf-device { margin-top:17px; border-top:1px solid #465044; padding-top:3px; }
.pf-transfer>summary,.pf-device>summary { cursor:pointer; padding:11px 0; color:#dedfca; font:600 13px/1.4 var(--sans); }
.pf-transfer p,.pf-muted { margin:0 0 10px; color:#c7cebf; font:13px/1.55 var(--sans); }
.pf-transfer small { display:block; color:#b8c4b0; margin:5px 0 0; }
.pf-transfer form { border-top:1px solid #414b3f; padding-top:14px; margin-top:14px; }
.pf-transfer form p { margin:0; }
[data-pf="recovery-box"] { display:grid; gap:7px; margin-top:9px; }
[data-pf="recovery-box"] .secondary-button { justify-self:start; }
.pf-body h3 { margin:0 0 8px; font:700 21px/1.1 "Field Condensed",var(--sans); }
.pf-stats { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; margin:0 0 17px; }
.pf-stats>div { display:flex; flex-direction:column-reverse; padding:10px; border:1px solid #4b574a; border-radius:4px; background:#263026; }
.pf-stats dd { margin:0; color:#f0d9a6; font:700 26px/1.08 "Field Condensed",var(--sans); }
.pf-stats dt,.pf-history small,.pf-history time { display:block; color:#bac5b4; font:12px/1.4 var(--sans); }
.pf-history { list-style:none; margin:0; padding:0; }
.pf-history li { display:flex; gap:10px; align-items:center; padding:8px 0; border-top:1px solid #384436; }
.pf-history li>div { flex:1; min-width:0; }
.pf-history strong { font-size:13px; overflow-wrap:anywhere; }
.pf-outcome { text-align:center; padding:5px; min-width:40px; border-radius:3px; font:700 12px/1.3 var(--sans); color:#e1d5ba; background:#3c392e; }
.pf-win { color:#cfebc3; background:#324431; } .pf-loss { color:#f0c8b6; background:#433129; }
.pf-device .rating-profile { margin-top:3px; }
@media(max-width:410px) {
  .pf-banner { padding:14px; min-height:94px; }
  .pf-body { padding:13px; }
  .pf-crest-choice { gap:4px; font-size:15px; }
  .pf-crest-choice .profile-crest { width:21px; height:21px; }
}

.pf-new-player { margin-bottom:12px; }
