/* Shared site fixes, including the profile widget's legacy inline styles. */
html body dialog.am-validation-dialog[open]{position:fixed!important;inset:0!important;margin:auto!important;width:calc(100vw - 32px)!important;max-width:520px!important;height:fit-content!important;max-height:calc(100vh - 32px)!important;max-height:calc(100dvh - 32px)!important;overflow:auto!important;box-sizing:border-box;padding:24px!important;box-shadow:0 24px 80px #0008}
html body #notifications_line .block_head{display:flex!important;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;padding:18px 22px!important;height:auto!important;min-height:70px;line-height:1.35}
html body #notifications_line .block_head button{position:static!important;float:none!important;transform:none!important;margin:0!important;flex:0 0 auto;font-size:13px!important;padding:8px 12px!important;line-height:1.3}
html body .gma-match-head-awards{display:flex!important;flex-wrap:wrap!important;gap:6px!important;padding:0!important;margin-top:9px!important;border:0!important;background:none!important;width:auto!important;max-width:100%;box-sizing:border-box}
html body .gma-match-head-awards .gma-match-award-badge{display:inline-flex!important;align-items:center!important;gap:5px!important;padding:4px 7px!important;border:1px solid #3d5264!important;border-radius:6px!important;background:#101e2b!important;color:#c8d9e6!important;font-size:12px!important;line-height:1.35!important;white-space:nowrap!important;box-shadow:none!important}
html body .gma-match-head-awards .gma-match-award-badge i{display:inline-flex;align-items:center;justify-content:center;flex:0 0 15px;width:15px;height:15px;font-style:normal;line-height:1;color:#d7bb79}
html body .gma-match-head-awards .award-clutch i,html body .gma-match-head-awards .award-ace i{font-size:0!important;background:center/15px 15px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d7bb79' stroke-width='1.8'%3E%3Cpath d='M12 2 21 12 12 22 3 12Z'/%3E%3Cpath d='m8 12 3 3 5-6'/%3E%3C/svg%3E")}
html body .gma-match-head-awards .award-ace i{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d7bb79' stroke-width='1.8'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m12 5 2 4 5 1-4 3 1 5-4-2-4 2 1-5-4-3 5-1Z'/%3E%3C/svg%3E")}
@media(max-width:650px){
 html body #notifications_line .block_head{justify-content:center!important;text-align:center;font-size:19px!important;gap:10px}
 html body #notifications_line .block_head button{display:block!important;margin:0 auto!important}
 html body .gma-profile .gma-match-head,html body .automix .gma-match-head{display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;gap:9px 12px!important;padding:13px!important;align-items:center!important}
 html body .gma-match-head .gma-match-main{grid-column:1/-1!important;display:grid!important;grid-template-columns:56px minmax(0,1fr)!important;gap:10px!important;align-items:start!important;min-width:0}
 html body .gma-match-main>div{min-width:0}
 html body .gma-match-head .gma-map-thumb{width:56px!important;height:40px!important;max-width:56px!important;object-fit:cover!important;margin:2px 0 0!important}
 html body .gma-match-head .gma-match-title{font-size:15px!important;line-height:1.4!important;overflow-wrap:anywhere}
 html body .gma-match-head .gma-match-meta{font-size:12px!important;line-height:1.6!important;white-space:normal!important}
 html body .gma-match-head .gma-match-score{grid-column:1!important;grid-row:2!important;justify-self:start!important;align-self:center!important;font-size:20px!important;padding:0!important;min-height:0!important;background:none!important;border:0!important}
 html body .gma-match-head .gma-match-result{grid-column:2!important;grid-row:2!important;align-self:center!important;justify-self:end!important;width:auto!important;height:auto!important;min-height:0!important;padding:5px 9px!important;border:1px solid #3d5264!important;border-radius:6px!important;background:#172534!important;font-size:11px!important;line-height:1.3!important}
 html body .gma-match-head .gma-match-kd:after{content:none!important}
 html body .gma-match-head-awards .gma-match-award-badge{font-size:11px!important;padding:4px 6px!important}
}
@media(max-width:400px){html body #notifications_line .block_head button{flex-basis:auto}html body #notifications_line .block_head{flex-direction:column!important}}

/* Mobile score/result must occupy one row, never a stretched side column. */
@media(max-width:800px){
 html body .gma-profile details.gma-match>summary.gma-match-head.gma-match-head,html body .automix .gma-match>.gma-match-head{display:grid!important;grid-template-columns:minmax(0,1fr) max-content!important;grid-template-rows:auto auto!important;gap:10px!important;align-items:center!important;padding:12px!important}
 html body .gma-profile details.gma-match>summary.gma-match-head.gma-match-head>.gma-match-main{grid-column:1/-1!important;grid-row:1!important;display:grid!important;grid-template-columns:54px minmax(0,1fr)!important;gap:10px!important;align-items:start!important}
 html body .gma-profile details.gma-match>summary.gma-match-head.gma-match-head .gma-map-thumb{width:54px!important;height:38px!important;min-width:0!important;flex-basis:54px!important}
 html body .gma-profile details.gma-match>summary.gma-match-head.gma-match-head .gma-match-title{font-size:15px!important;line-height:1.35!important}
 html body .gma-profile details.gma-match>summary.gma-match-head.gma-match-head .gma-match-meta{font-size:12px!important;line-height:1.5!important}
 html body .gma-profile details.gma-match>summary.gma-match-head.gma-match-head>.gma-match-score,html body .gma-profile details.gma-match>summary.gma-match-head.gma-match-head>.gma-match-result{position:static!important;inset:auto!important;transform:none!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;align-self:center!important;min-height:0!important;height:auto!important;max-height:none!important;width:auto!important;min-width:0!important;margin:0!important;box-sizing:border-box!important;border-left:0!important;float:none!important;grid-row:2!important}
 html body .gma-profile details.gma-match>summary.gma-match-head.gma-match-head>.gma-match-score{grid-column:1!important;justify-self:start!important;border:0!important;background:none!important;padding:0!important;font-size:21px!important;line-height:1.2!important}
 html body .gma-profile details.gma-match>summary.gma-match-head.gma-match-head>.gma-match-result{grid-column:2!important;justify-self:end!important;padding:5px 8px!important;font-size:11px!important;line-height:1.25!important;border:1px solid #405165!important;border-radius:6px!important}
 html body .gma-profile details.gma-match>summary.gma-match-head.gma-match-head>.gma-match-result.win{background:#b6994420!important;color:#ead087!important}
 html body .gma-profile details.gma-match>summary.gma-match-head.gma-match-head>.gma-match-result.loss{background:#bd657c20!important;color:#e58a87!important}
 html body .gma-profile details.gma-match>summary.gma-match-head.gma-match-head>.gma-match-result.cancelled{background:#997dbb20!important;color:#c0a6d8!important}
 html body .gma-profile .gma-match-head-awards{gap:5px!important;border:0!important;padding:0!important;background:none!important}
 html body .gma-profile .gma-match-head-awards .gma-match-award-badge{border:1px solid #405165!important;border-left:1px solid #405165!important;border-radius:6px!important;padding:3px 6px!important;font-size:11px!important;line-height:1.3!important}
 html body .gma-profile .gma-common-match-head{grid-template-columns:minmax(0,1fr) max-content!important;align-items:center!important;gap:8px!important}
 html body .gma-profile .gma-common-match-head>div{grid-column:1/-1!important}
 html body .gma-profile .gma-common-match-head>strong{grid-row:2!important;grid-column:1!important;justify-self:start!important}
 html body .gma-profile .gma-common-match-head>em{grid-row:2!important;grid-column:2!important;align-self:center!important;height:auto!important;min-height:0!important;position:static!important;padding:5px 8px!important}
}

@media(max-width:800px){
 html body .gma-profile details.gma-match>summary.gma-match-head.gma-match-head>:first-child{grid-column:1/-1!important;grid-row:1!important;align-self:start!important;padding:0!important;min-width:0!important}
 html body .gma-profile details.gma-match>summary.gma-match-head.gma-match-head::after{position:static!important;grid-column:1/-1!important;grid-row:3!important;justify-self:start!important;margin:0!important;padding:0!important;line-height:1!important}
}

/* Score and outcome form a compact right-aligned mobile group. */
@media(max-width:800px){
 html body .gma-profile details.gma-match>summary.gma-match-head.gma-match-head{grid-template-columns:minmax(0,1fr) max-content max-content!important;column-gap:10px!important}
 html body .gma-profile details.gma-match>summary.gma-match-head.gma-match-head>.gma-match-score{grid-column:2!important;grid-row:2!important;justify-self:end!important;align-self:center!important}
 html body .gma-profile details.gma-match>summary.gma-match-head.gma-match-head>.gma-match-result{grid-column:3!important;grid-row:2!important;justify-self:end!important;align-self:center!important}
}

/* Compact team profiles on phones; keep artwork large and uncropped. */
@media(max-width:650px){
 html body .automix .am-team-presentation,html body #am-dialog .am-team-presentation{gap:16px!important;padding:0!important}
 html body .automix .am-team-presentation .am-team-visual>img,html body #am-dialog .am-team-presentation .am-team-visual>img{width:100%!important;max-width:360px!important;height:auto!important;object-fit:contain!important;margin:0 auto!important}
 html body .am-team-presentation .am-team-identity h2{font-size:21px!important;line-height:1.3!important;margin:12px 0 16px!important}
 html body .am-team-presentation .am-team-members h3,html body .am-team-presentation .am-team-about h3,html body .am-team-presentation .am-imported-history h3{font-size:17px!important;line-height:1.35!important;margin:14px 0 10px!important;padding:0 0 8px!important}
 html body .am-team-presentation .am-member-line{padding:7px 9px!important;margin-bottom:5px!important;gap:8px!important;border-radius:8px!important;min-height:0!important}
 html body .am-team-presentation .am-member-heading .am-player,html body .am-team-presentation .am-member-heading .am-player-name,html body .am-team-presentation .am-member-heading .am-player-fallback{font-size:14px!important;line-height:1.25!important}
 html body .am-team-presentation .am-member-steam{font-size:10px!important;line-height:1.3!important;margin-top:3px!important;white-space:nowrap!important}
 html body .am-team-presentation .am-member-score{font-size:18px!important;line-height:1.2!important}
 html body .am-team-presentation .am-member-role{font-size:9px!important;line-height:16px!important}
 html body .automix .am-team-presentation .am-team-total,html body #am-dialog .am-team-presentation .am-team-total{padding:10px 12px!important;margin-top:10px!important;min-height:0!important}
 html body .am-team-presentation .am-team-total span{font-size:14px!important}html body .am-team-presentation .am-team-total strong{font-size:21px!important}
 html body .am-team-presentation .am-team-story{padding-top:0!important;margin-top:16px!important;gap:16px!important}
 html body .am-team-presentation .am-team-description{font-size:14px!important;line-height:1.6!important}
 html body .am-team-presentation .am-imported-history{margin-top:16px!important;padding-top:0!important}
 html body .automix .am-team-presentation .am-imported-history .am-history-result,html body #am-dialog .am-team-presentation .am-imported-history .am-history-result{grid-template-columns:minmax(0,1fr) 90px 10px!important;gap:7px!important;padding:10px 2px!important;align-items:center!important}
 html body .automix .am-team-presentation .am-imported-history .am-history-result>strong,html body #am-dialog .am-team-presentation .am-imported-history .am-history-result>strong{width:90px!important;min-height:30px!important;height:auto!important;padding:5px!important;font-size:11px!important;line-height:1.35!important;align-self:center!important}
 html body .am-team-presentation .am-history-result b{font-size:13px!important;line-height:1.35!important}
 html body .am-team-presentation .am-history-result small{font-size:11px!important;line-height:1.45!important;margin-top:3px!important}
 html body .am-team-presentation .am-history-cup svg{width:14px!important;height:14px!important}
}

/* Phone team card: artwork left, roster right, full-width story below. */
@media(max-width:650px){
 html body .automix .am-team-presentation,html body #am-dialog .am-team-presentation{display:block!important}
 html body .automix .am-team-presentation>.am-team-visual,html body #am-dialog .am-team-presentation>.am-team-visual{display:grid!important;grid-template-columns:minmax(90px,34%) minmax(0,1fr)!important;grid-template-rows:auto 1fr!important;gap:10px 12px!important;align-items:start!important}
 html body .automix .am-team-presentation>.am-team-visual>img,html body #am-dialog .am-team-presentation>.am-team-visual>img{grid-column:1!important;grid-row:1!important;width:100%!important;max-width:none!important;min-width:0!important;height:auto!important;aspect-ratio:1;object-fit:contain!important;margin:0!important}
 html body .am-team-presentation>.am-team-visual>.am-team-identity{grid-column:1!important;grid-row:2!important;align-self:start!important;min-width:0!important}
 html body .am-team-presentation>.am-team-visual>.am-team-identity h2{font-size:16px!important;line-height:1.35!important;margin:0!important;overflow-wrap:anywhere}
 html body .am-team-presentation>.am-team-visual>.am-team-members{grid-column:2!important;grid-row:1/3!important;margin:0!important;min-width:0!important}
 html body .am-team-presentation>.am-team-visual>.am-team-members h3{font-size:14px!important;margin:0 0 8px!important;padding-bottom:6px!important}
 html body .am-team-presentation .am-member-line{grid-template-columns:minmax(0,1fr) 28px!important;gap:4px!important;padding:6px!important;margin-bottom:5px!important}
 html body .am-team-presentation .am-member-heading{flex-wrap:wrap!important;gap:3px!important}
 html body .am-team-presentation .am-member-heading .am-player{flex-basis:100%!important;gap:5px!important}
 html body .am-team-presentation .am-member-heading .am-player-name,html body .am-team-presentation .am-member-heading .am-player-fallback{font-size:12px!important}
 html body .automix .am-team-presentation .am-member-line .am-avatar,html body #am-dialog .am-team-presentation .am-member-line .am-avatar{width:20px!important;height:20px!important;min-width:20px!important;max-width:20px!important;flex-basis:20px!important}
 html body .am-team-presentation .am-member-role{font-size:9px!important;line-height:12px!important}
 html body .am-team-presentation .am-member-steam{font-size:9px!important;margin-top:2px!important}
 html body .am-team-presentation .am-member-score{font-size:16px!important}
 html body .automix .am-team-presentation .am-team-total,html body #am-dialog .am-team-presentation .am-team-total{padding:7px!important;gap:5px!important;margin-top:7px!important}
 html body .am-team-presentation .am-team-total span{font-size:11px!important}html body .am-team-presentation .am-team-total strong{font-size:17px!important}
 html body .am-team-presentation>.am-team-story{display:block!important;width:100%!important;margin-top:18px!important;padding:0!important}
 html body .am-team-presentation .am-team-about{margin:0!important;padding:0!important}
}

html body .profile-wall #add_new_comments{padding:18px 20px!important}
html body .profile-wall #add_new_comments .mce-tinymce{width:100%!important;box-sizing:border-box!important;border:1px solid #3b5063!important;border-radius:8px!important;overflow:hidden!important}
html body .profile-wall #add_new_comments .mce-edit-area{background:#101b28!important}
html body .profile-wall #add_new_comments iframe{min-height:150px!important;height:170px!important;background:#101b28!important}
html body .profile-wall .smile_input_forum{display:flex!important;align-items:center!important;gap:12px!important;margin-top:12px!important}
@media(max-width:650px){html body .profile-wall #add_new_comments{padding:12px!important}}
