/* PCM Pro Lineup 2.0 — typography, editable FIFA-style player cards and avatar crop. */
@import url('https://fonts.googleapis.com/css2?family=Be+Vietnam+Pro:wght@400;500;600;700;800;900&family=Montserrat:wght@400;600;700;800;900&family=Noto+Sans:wght@400;600;700;800;900&display=swap');
:root{--pcm-font:'Be Vietnam Pro','Noto Sans',Arial,sans-serif}
body,.pl-poster,.pl-title,.pl-team,.pl-slogan,.pl-panel-bar,.pl-table,.pl-brush,.pl-field-name,.pl-card-name,.pl-card-number{font-family:var(--pcm-font)!important}
.pl-title{font-size:49px;letter-spacing:-1.4px;line-height:1.18}.pl-team{font-size:49px;letter-spacing:-1px;line-height:1.27}.pl-top-center{top:18px}
.pl-slogan{font-size:15px;letter-spacing:.25px}.pl-panel-bar{font-size:23px;letter-spacing:-.5px}.pl-field-panel .pl-panel-bar{font-size:19px}
.pl-brush{font-size:17px}.pl-table th{font-size:13px}.pl-coach-grid strong{font-size:12px}
.pcm-visual-editor{display:flex;flex-direction:column;gap:14px;margin:16px 0;border-radius:14px;padding:13px;background:#082c30;border:1px solid #376d65}
.pcm-editor-section{border-bottom:1px solid #ffffff20;padding-bottom:14px}.pcm-editor-section:last-child{border-bottom:0;padding-bottom:0}
.pcm-editor-section h3{color:#b4f9d5;font-size:12px;letter-spacing:.3px;margin:0 0 10px}.pcm-editor-section small{color:#a8c7bb;font-size:10px;line-height:1.5;display:block;margin-top:7px}
.pcm-logo-row{display:flex;align-items:center;gap:12px}
.pcm-logo-target{display:flex;gap:8px;align-items:center;border:1px dashed #6cc0a2;background:#103a39;border-radius:10px;padding:8px 12px;color:#fff;cursor:pointer;font-size:11px}
#quickLogoPreview{width:62px;height:62px;border-radius:13px;background:#001c23;display:flex;align-items:center;justify-content:center;font-size:30px;overflow:hidden;border:2px solid #c8b174}
#quickLogoPreview img{width:100%;height:100%;object-fit:contain}
.pcm-logo-row button{padding:8px 12px;font-size:11px}
.pcm-frame-picker{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:5px}
.pcm-frame-option{padding:4px 2px;border:2px solid transparent;background:#204047;border-radius:8px;color:#d6f2e7;cursor:pointer;display:flex;flex-direction:column;align-items:center;gap:5px;min-width:0}
.pcm-frame-option img{width:100%;height:73px;object-fit:fill;border-radius:3px}
.pcm-frame-option span{font-size:9px;text-align:center;white-space:nowrap;overflow:hidden;max-width:100%;text-overflow:ellipsis}
.pcm-frame-option.active{border-color:#a1f7c5;background:#2a5d54;box-shadow:0 0 0 2px #a1f7c524}
.pcm-size-control,.pcm-font-choice{display:flex;flex-direction:column;gap:7px;color:#e5f8ed;font-size:11px;font-weight:800;margin:8px 0}
.pcm-size-control output{float:right;color:#9df4c9}
.pcm-size-control input{width:100%;accent-color:#7dffbd}
.pcm-font-choice select{min-width:0;width:100%;background:#092631;color:#fff;border:1px solid #5e9391;border-radius:8px;height:36px;padding:0 9px;font-size:12px}
.pl-crest-img{position:absolute;z-index:3;inset:17px 24px 22px;width:calc(100% - 48px);height:calc(100% - 39px);object-fit:contain;filter:drop-shadow(0 2px 2px #0009)}
.pl-crest:has(.pl-crest-img:not([hidden])) .pl-crown,.pl-crest:has(.pl-crest-img:not([hidden])) .pl-ball,.pl-crest:has(.pl-crest-img:not([hidden])) .pl-crest-band,.pl-crest:has(.pl-crest-img:not([hidden])) .pl-crest-year{visibility:hidden}
.pl-person-thumb{border-radius:50%!important;width:29px!important;height:29px!important}
.pl-field-player.pcm-card-player{width:104px;height:134px;display:block;transform:translate(-50%,-50%) scale(var(--pcm-card-scale,1));transform-origin:center center;overflow:visible;filter:drop-shadow(0 5px 3px #10231480)}
.pcm-player-frame{position:relative;width:100%;height:100%;display:block;isolation:isolate}
.pcm-player-art{position:absolute;inset:0;width:100%;height:100%;object-fit:fill;pointer-events:none;z-index:0}
.pcm-card-top{position:absolute;z-index:1;top:10%;left:13%;right:13%;height:58%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px}
.pcm-card-circle{width:69px;height:69px;max-height:100%;border-radius:50%;border:2.5px solid #fff9cf;box-shadow:0 0 0 2px #3c2815a6,0 2px 9px #000a;background:#063c3d;overflow:hidden;position:relative;display:grid;place-items:center}
.pcm-card-circle img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:50% 50%;max-width:none;max-height:none;transform-origin:center center;pointer-events:none}
.pcm-card-placeholder{font-size:23px;color:#f9f1ce;font-weight:1000}
.pcm-card-number{position:absolute;z-index:4;top:8%;left:10%;background:linear-gradient(145deg,#fff8c4,#cf9c46);border:1px solid #ffedaf;border-radius:5px;padding:2px 4px;min-width:28px;max-width:42px;overflow:hidden;text-overflow:ellipsis;text-align:center;color:#14283a;font-size:16px;line-height:1.15;font-weight:1000;box-shadow:0 2px 4px #0009}
.pcm-card-name{position:absolute;bottom:8%;left:9%;right:9%;height:23%;z-index:3;display:flex;flex-direction:column;align-items:center;justify-content:center;color:#fff;line-height:1.18;font-size:10px;font-weight:900;text-align:center;border-radius:5px;background:linear-gradient(180deg,#061c31dc,#01101cf3);border:1px solid #e0b96f9c;text-shadow:0 1px 1px #000;overflow:hidden;word-break:break-word;padding:2px 3px}
.pcm-card-name b{width:100%;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10px}.pcm-card-name small{font-size:9px;opacity:.83;margin-top:2px}
.pcm-card-player.empty{opacity:.8}.pcm-card-player.empty .pcm-card-number{font-size:12px}
.quick-picture img{border-radius:6px}
.pcm-edit-photo{border:1px solid #84e4b4;background:#143e3b;color:#d7ffe7;border-radius:5px;padding:4px 9px;font-size:10px;cursor:pointer;margin-left:auto}
.pcm-crop-modal[hidden]{display:none!important}.pcm-crop-modal{position:fixed;z-index:9999;inset:0;background:#00131eea;display:flex;align-items:center;justify-content:center;padding:16px}
.pcm-crop-dialog{background:#102d34;color:#f5fff9;border:1px solid #67b997;border-radius:16px;padding:18px;width:min(430px,100%);max-height:94vh;overflow:auto;box-shadow:0 24px 70px #0009;font-family:var(--pcm-font)}
.pcm-crop-head{display:flex;align-items:center;justify-content:space-between}.pcm-crop-head h2{font-size:16px;margin:0}.pcm-crop-head button{background:#31545b;border:0;border-radius:6px;color:#fff;padding:7px 10px;cursor:pointer}
.pcm-crop-dialog p{font-size:11px;line-height:1.5;color:#b8e0d0}
.pcm-crop-stage{display:grid;place-items:center;background:radial-gradient(#156c63,#05232e);padding:18px;border-radius:10px}
.pcm-crop-circle{width:210px;height:210px;border-radius:50%;border:4px solid #e5c47d;overflow:hidden;position:relative;background:#031b20;touch-action:none;cursor:grab;box-shadow:0 0 0 6px #ffffff1a}
.pcm-crop-circle:active{cursor:grabbing}.pcm-crop-circle img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:center;max-width:none;user-select:none;pointer-events:none}
.pcm-crop-sliders{display:grid;gap:12px;padding:16px 4px}.pcm-crop-sliders label{display:grid;gap:5px;font-size:12px;font-weight:700}.pcm-crop-sliders output{color:#b6eac9}.pcm-crop-sliders input{width:100%;accent-color:#a5ffbe}
.pcm-crop-actions{display:flex;justify-content:flex-end;gap:8px}.pcm-crop-actions button{min-width:110px}
@media(max-width:520px){.pcm-frame-picker{grid-template-columns:repeat(4,minmax(0,1fr))}.pcm-frame-option img{height:85px}.pcm-visual-editor{padding:10px}.pcm-logo-row{gap:6px}}

/* V3: visible frame selection, transparent PNG previews and reliable crest */
.pcm-save-status{border:1px solid #63dba7;background:#0c493a;color:#eaffec;border-radius:9px;font-weight:700;font-size:12px;padding:10px 12px;margin:0 0 14px;line-height:1.5}
.pcm-save-status[data-state="busy"]{color:#ffe4a0;border-color:#b39852;background:#403419}
.pcm-save-status[data-state="error"]{color:#ffe0d4;border-color:#d47878;background:#4b282e}
.pcm-frame-instruction{font-size:11px;color:#c6e5d7;margin:0 0 12px;line-height:1.55}
.pcm-active-frame{display:flex;align-items:center;gap:14px;background:linear-gradient(120deg,#092630,#23483e);border:2px solid #f5cb72;border-radius:12px;padding:9px 12px;margin-bottom:13px}
.pcm-active-img{width:91px;height:127px;flex:0 0 91px;display:grid;place-items:center;border-radius:8px;background:repeating-conic-gradient(#25434c 0 25%,#334e55 0 50%) 0 0/20px 20px}
.pcm-active-img img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(0 2px 4px #0007)}
.pcm-active-meta{display:grid;gap:4px;min-width:0;color:#def9ef}.pcm-active-meta b{color:#ffe19a;font-size:17px;line-height:1.3}.pcm-active-meta small{color:#a7fbd0;font-size:10px!important;letter-spacing:1px}.pcm-active-meta span{font-size:11px;color:#b3d8ca}
.pcm-frame-picker{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.pcm-frame-option{background:#17323a;border:2px solid #467780;padding:9px 7px 8px;gap:6px;border-radius:12px;min-width:0;min-height:160px;transition:background .12s,border-color .12s}
.pcm-frame-option img{height:133px;width:100%;object-fit:contain;border-radius:7px;background:repeating-conic-gradient(#203941 0 25%,#2c464f 0 50%) 0 0/18px 18px}
.pcm-frame-option span{font-size:12px;font-weight:800;max-width:100%;white-space:normal;line-height:1.25;min-height:16px}
.pcm-frame-option.active,.pcm-frame-option[aria-pressed="true"]{border-color:#ffd16c;background:#4a4030;box-shadow:0 0 0 2px #ffe1945e,inset 0 0 16px #ffde6520}
.pcm-frame-option:focus-visible{outline:3px solid #ffd875;outline-offset:3px}
.pl-crest-img:not([hidden]){display:block!important;visibility:visible!important;opacity:1!important;z-index:9!important;object-fit:contain}
.pl-crest:has(.pl-crest-img:not([hidden])) .pl-crown,.pl-crest:has(.pl-crest-img:not([hidden])) .pl-ball,.pl-crest:has(.pl-crest-img:not([hidden])) .pl-crest-band,.pl-crest:has(.pl-crest-img:not([hidden])) .pl-crest-year{visibility:hidden}
.pcm-player-art{object-fit:contain}
@media(max-width:520px){.pcm-frame-picker{grid-template-columns:repeat(2,minmax(0,1fr))}.pcm-frame-option img{height:124px}.pcm-frame-option{min-height:155px}}
