/* Event team management. Scoped to dialogs: no global roster/league layout changes. */
#team-roster-dialog{width:min(1200px,calc(100vw - 48px));max-width:1200px;max-height:94vh;padding:0;border:1px solid #66504a70;border-radius:12px;background:linear-gradient(145deg,#1b1b23,#11141d 60%);color:#ecedf3;box-shadow:0 22px 70px #0007;overflow:auto}
#team-roster-dialog::backdrop,.tm-subdialog::backdrop{background:#03050bbd;backdrop-filter:blur(6px)}
#team-roster-form{display:block;padding:0;margin:0}#team-roster-form .tm-header{display:flex;align-items:center;justify-content:space-between;padding:23px 30px 18px;margin:0;border-top:2px solid #ad6260}#team-roster-form .tm-header small{font-size:9px;letter-spacing:3px;color:#be9878}#team-roster-form h2{font-size:26px;font-weight:600;letter-spacing:2px;color:#ecedf3;margin:7px 0 0}#team-roster-form .tm-header button{background:transparent;border:0;color:#a09598;font-size:26px;padding:5px 10px}
#team-roster-form .tm-event-line{display:flex;align-items:center;justify-content:space-between;padding:14px 30px;border-block:1px solid #ffffff0e;font-size:11px;color:#d8c6ac}#team-roster-status{color:#90b7a7}#team-roster-form .tm-grid{display:grid;grid-template-columns:340px minmax(0,1fr)}
#team-roster-form .tm-identity{display:flex;flex-direction:column;padding:27px 28px 20px;border-right:1px solid #ffffff0e;background:linear-gradient(160deg,#2e22272b,transparent)}#team-roster-form #team-avatar-editor{display:contents;padding:0;margin:0;border:0;background:none}#team-roster-form h3{margin:0;font-size:16px;font-weight:500;letter-spacing:1px;color:#ecedf3}#team-roster-form h3 small{font-size:9px;letter-spacing:2px;color:#626774;margin-left:13px}
#team-roster-form .tm-identity-title{order:0}#team-roster-form .tm-crest-stage{order:1;position:relative;display:flex;align-items:center;justify-content:center;height:198px;margin:7px 0 15px;background:radial-gradient(ellipse,#628da217,transparent 65%)}#team-roster-form .tm-crest-stage>.team-emblem{width:164px;height:164px;flex-basis:164px;background:transparent;border:0;box-shadow:none;filter:drop-shadow(0 8px 16px #0005)}#team-roster-form .tm-crest-stage .team-emblem-fallback{font-size:55px}#team-roster-form .tm-crest-stage>span:last-child{position:absolute;bottom:0;font-size:8px;letter-spacing:3px;color:#5e6470}
#team-roster-form .tm-name-field{order:2;display:block;color:#b1b1be;font-size:11px;margin:0}#team-roster-form .tm-name-field>small{float:right;color:#666c79;font-size:10px}#team-roster-form #team-roster-name{display:block;margin-top:9px;width:100%;height:45px;font-size:17px;letter-spacing:1px;background:#0e1119;border:1px solid #303440;border-radius:5px;padding:10px 13px;color:#e9eaf0}#team-roster-name:disabled{opacity:.75}
#team-roster-form .tm-credit{order:3;display:flex;align-items:center;justify-content:space-between;margin-top:18px;padding:15px;border:1px solid #b9975142;background:linear-gradient(105deg,#a47d1911,#9f78320a);border-radius:6px}#team-roster-form .tm-credit strong{font-size:12px;color:#dfc897;font-weight:500}#team-roster-form .tm-credit p{font-size:9px;margin:7px 0 0;color:#8f8676}#team-roster-form .tm-credit>b{font:30px/1 Georgia,serif;color:#e8ce96;text-align:right}#team-roster-form .tm-credit>b small{display:block;font:9px "Microsoft YaHei",sans-serif;color:#9d8b69;margin-top:6px}
#team-roster-form .tm-crest-button{order:4;width:100%;height:41px;margin-top:12px;border:1px solid #4b4750;border-radius:5px;background:#242630;color:#e9e1d4;font-size:12px}#team-roster-form .tm-crest-readonly{order:4;font-size:11px;color:#92919f;text-align:center}#team-roster-form .tm-asset-hint{order:5;font-size:9px;text-align:center;color:#747783;margin:11px 0 0}#team-roster-form .team-avatar-message{order:6;font-size:10px;color:#d7c18f;min-height:14px;text-align:center;margin:8px 0 0}
#team-roster-form .tm-roster{padding:28px 30px 22px;min-width:0}#team-roster-form .tm-section-title{display:flex;align-items:center;justify-content:space-between}#team-roster-count{font:20px Georgia,serif;color:#dcd3c5;letter-spacing:2px}#team-roster-permission{font-size:11px;color:#878b98;margin:12px 0 24px}#team-roster-form .tm-columns,#team-roster-form .tm-player{display:grid;grid-template-columns:55px minmax(0,1fr) 103px 66px;gap:13px;align-items:center}#team-roster-form .tm-columns{padding:0 15px;font-size:10px;color:#6f7381;margin-bottom:11px;letter-spacing:1px}#team-roster-form .tm-player{height:73px;padding:13px 15px;margin-bottom:9px;border:1px solid #42455155;border-radius:7px;background:linear-gradient(90deg,#25232b80,#181b2555);position:relative}#team-roster-form .tm-player:before{content:"";position:absolute;left:-1px;top:20px;bottom:20px;width:2px;background:#9b565d80}#team-roster-form .tm-role{font-size:12px;color:#d5bfa1}#team-roster-form .tm-role small{display:block;font-size:8px;letter-spacing:1px;color:#6e6d7b;margin-top:5px}#team-roster-form .tm-player-identity{display:flex;align-items:center;gap:12px;min-width:0}#team-roster-form .tm-player-identity img{width:40px;height:40px;object-fit:cover;border-radius:6px;border:1px solid #ac917548}#team-roster-form .tm-player-identity>div{min-width:0}#team-roster-form .tm-player-identity strong{display:block;font-size:13px;font-weight:500;color:#e1dfe6;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}#team-roster-form .tm-player-identity p{font-size:10px;color:#767b8b;margin:5px 0 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#team-roster-form select.tm-position{font-size:11px;height:32px;padding:0 9px;background:#12151eb3;border:1px solid #44435266;border-radius:5px;color:#a9a7b4;width:100%;min-width:0}#team-roster-form .tm-replace{border:0;color:#b6a796;background:transparent;font-size:11px;padding:8px 0}#team-roster-form .tm-position-readonly{font-size:11px;color:#878b98}#team-roster-form .tm-hint{font-size:10px;color:#777b8a;margin:17px 0 0}#team-roster-form [hidden]{display:none!important}
#team-roster-form .team-roster-actions{display:flex;align-items:center;gap:16px;padding:18px 29px;margin:0;background:#0c0f1670;border-top:1px solid #ffffff0e}#team-roster-form .team-roster-actions>span{font-size:10px;color:#777a87}#team-roster-form #save-team-roster{margin-left:auto;background:linear-gradient(105deg,#a74553,#a56651);border:1px solid #bb7a64;color:#fff2e7;font-size:12px;border-radius:5px;padding:10px 21px}#team-roster-form #delete-team-roster{border:0;background:transparent;font-size:10px;color:#a96973;padding:5px 0}#team-roster-message{margin:12px 30px}
.tm-subdialog{width:470px;max-width:calc(100vw - 32px);max-height:90vh;overflow:auto;padding:26px;border:1px solid #66514c;border-radius:12px;background:#181b25;color:#ecedf3;box-shadow:0 30px 100px #0009}.tm-subdialog header{display:flex;justify-content:space-between;align-items:center;gap:12px}.tm-subdialog h2{margin:5px 0;font-size:21px;font-weight:500}.tm-subdialog header small{font-size:9px;letter-spacing:2px;color:#be9878}.tm-subdialog header button{border:0;background:transparent;color:#a59ca0;font-size:24px}.tm-subdialog p{font-size:11px;color:#9394a2;line-height:1.7}.tm-subdialog button{cursor:pointer;border:1px solid #3b3d4b;background:#1c1e28;color:#d4ccca;border-radius:5px;padding:10px 16px;font-size:12px}.tm-subdialog button:disabled,#team-roster-form button:disabled{opacity:.42;cursor:not-allowed}.tm-upload-stage{display:flex;flex-direction:column;align-items:center;gap:15px;padding:20px;border:1px dashed #534958;border-radius:7px;background:radial-gradient(ellipse,#52617b22,transparent 70%)}.tm-upload-stage img{width:154px;height:154px;object-fit:contain}.tm-subdialog [hidden]{display:none!important}.tm-usage{display:flex;justify-content:space-between;border-top:1px solid #ffffff0e;padding-top:15px;font-size:11px;color:#8c8e9c}.tm-usage strong{color:#d6bd87;font-weight:500}.tm-subdialog footer{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}.tm-subdialog .primary-btn{background:linear-gradient(105deg,#a74553,#a56651);border-color:#bb7a64;color:#fff2e7}#team-roster-member-search{margin:18px 0;width:100%;padding:11px;background:#0e1119;border:1px solid #303440;border-radius:5px;color:#ecedf3}#team-member-candidates{max-height:340px;overflow:auto;display:grid;gap:7px}.tm-candidate{display:flex;justify-content:space-between;align-items:center;text-align:left;gap:15px}.tm-candidate strong{font-weight:500}.tm-candidate span{font-size:10px;color:#8f8d9d}
#team-roster-form .team-roster-actions button{width:auto;flex:0 0 auto}#team-roster-form .team-roster-actions>span{flex:1;min-width:0}
@media(max-width:1000px){#team-roster-form .tm-grid{grid-template-columns:285px minmax(0,1fr)}#team-roster-form .tm-roster{padding-inline:18px}#team-roster-form .tm-identity{padding-inline:20px}#team-roster-form .tm-player,#team-roster-form .tm-columns{grid-template-columns:40px minmax(0,1fr) 75px 43px;gap:8px}}
@media(max-width:700px){#team-roster-dialog{width:calc(100vw - 24px)}#team-roster-form .tm-grid{grid-template-columns:1fr}#team-roster-form .tm-identity{border-right:0;border-bottom:1px solid #ffffff0e}#team-roster-form .tm-roster{padding:22px 12px}#team-roster-form .tm-header,#team-roster-form .tm-event-line{padding-inline:20px}#team-roster-form .tm-player{padding-inline:8px}#team-roster-form .tm-player-identity{gap:7px}#team-roster-form .tm-player-identity img{width:30px;height:30px}#team-roster-form .tm-player-identity strong{font-size:11px}#team-roster-form .team-roster-actions{padding:15px;flex-wrap:wrap;gap:10px}}
