/* V11.39: shared game panels, readable match actions, correct clan-card hierarchy. */
body.aow-masters-theme .tournament-match .match-foot {display:flex!important;flex-wrap:wrap!important;gap:8px!important;align-items:stretch!important;}
body.aow-masters-theme .tournament-match .match-foot-status {flex:1 0 100%!important;min-width:0;}
body.aow-masters-theme .tournament-match .match-chat-button {flex:1 1 110px!important;min-width:0!important;width:auto!important;max-width:100%!important;min-height:44px!important;height:auto!important;padding:8px!important;display:flex!important;align-items:center;justify-content:center;gap:6px;white-space:normal!important;border:1px solid #6aa6a7!important;border-radius:0!important;background:linear-gradient(#285f68,#0a2529)!important;color:#eaf5f1!important;font:700 16px/1.3 var(--aow-heading,sans-serif)!important;box-shadow:inset 0 1px 0 #9cd6cc66!important;}
body.aow-masters-theme .match-chat-button .match-chat-button-label {min-width:0;white-space:normal!important;overflow:visible!important;text-overflow:clip!important;color:inherit!important;line-height:1.3;}
body.aow-masters-theme .match-chat-button .match-chat-icon {color:#a5e3dd!important;text-shadow:none!important;flex:0 0 auto;}
body.aow-masters-theme :is(#match-schedule-modal,#match-setup-modal,#shared-match-setup) :is(.chat-message-modal-panel,.match-setup-panel) {background:repeating-linear-gradient(0deg,#0000 0 3px,#0002 3px 4px),linear-gradient(135deg,#133035,#041215)!important;border:1px solid #609b9c!important;border-radius:0!important;box-shadow:0 16px 64px #000b!important;}
body.aow-masters-theme :is(#match-schedule-modal,#match-setup-modal,#shared-match-setup) :is(button,.btn):not(.map-card):not(.era-card) {border-radius:0!important;}
body.aow-masters-theme #match-schedule-admin-choices {background:#0b2326!important;border-color:#507f82!important;border-radius:0!important;}
body.aow-masters-theme :is(#match-schedule-modal,#match-setup-modal) :is(.btn,button[type=submit],.chat-message-modal-x) {background:linear-gradient(#285c63,#102f34)!important;border:1px solid #71a9aa!important;color:#ecf7f4!important;text-shadow:none!important;}
body.aow-masters-theme :is(.match-schedule-guide,.scheduler-info-note,.scheduler-config-card,.scheduler-pre-panel) {border-radius:0!important;border-color:#527f83!important;background:#071c1f!important;}
body.aow-masters-theme .match-schedule-guide-grid {gap:18px;}
body.aow-masters-theme .match-schedule-guide-item {min-width:0;align-items:flex-start;}
body.aow-masters-theme .match-schedule-guide-item small {color:#b4cbcb!important;}
body.aow-masters-theme #match-schedule-modal .chat-message-modal-panel {width:min(760px,calc(100vw - 24px))!important;max-width:calc(100vw - 24px)!important;max-height:calc(100dvh - 24px)!important;padding:24px!important;overflow:auto!important;box-sizing:border-box;}
body.aow-masters-theme .chat-member-sidebar.open {position:fixed!important;right:12px!important;top:12px!important;bottom:12px!important;height:calc(100dvh - 24px)!important;width:min(380px,calc(100vw - 24px))!important;max-width:calc(100vw - 24px)!important;z-index:10070!important;transform:none!important;opacity:1!important;display:block!important;border:1px solid #63989b!important;box-shadow:0 0 0 100vmax #0009!important;background:linear-gradient(140deg,#123136,#051518)!important;}
body.aow-masters-theme .chat-member-sidebar:not(.open) {visibility:hidden;}
body.aow-masters-theme .chat-member-sidebar-scroll {height:calc(100% - 72px)!important;max-height:none!important;overflow:auto!important;}
body.aow-masters-theme .chat-member-sidebar-close {width:40px!important;height:40px!important;flex:0 0 40px;border:1px solid #63989b!important;border-radius:0!important;background:#123b40!important;font-size:24px!important;}
body.aow-masters-theme .aow-card-clan {color:#9bd8d3;font-size:18px;line-height:1.45;border-top:1px solid #426b70;padding-top:10px;margin:8px 0;overflow-wrap:anywhere;}
.aow-public-card {width:min(560px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;box-sizing:border-box;background:repeating-linear-gradient(0deg,#0000 0 3px,#0002 3px 4px),linear-gradient(140deg,#123136,#041215);border:1px solid #62999c;border-radius:0;padding:24px;color:#e7f2ef;box-shadow:0 24px 80px #000b;font:18px/1.5 var(--aow-body,sans-serif);}
.aow-public-card::backdrop {background:#000b;backdrop-filter:blur(4px);}
.aow-public-card header {display:flex;gap:16px;align-items:center;margin:8px 0 16px;}
.aow-public-card header img {width:68px;height:68px;object-fit:contain;flex:0 0 68px;}
.aow-public-card header h2 {margin:4px 0;overflow-wrap:anywhere;}
.aow-public-card header>div {min-width:0;}
.aow-public-card .aow-card-close {float:right;border:1px solid #77a9aa;background:#103339;color:#e8f5f1;width:40px;height:40px;font-size:24px;cursor:pointer;}
.aow-public-card section {border-top:1px solid #426b70;padding-top:12px;margin-top:16px;}
.aow-public-card h3 {font-size:18px!important;color:#a3dcd6;margin:0 0 8px;}
.aow-public-card .aow-card-player {padding:8px 10px;margin-top:6px;border:1px solid #426b70;background:#05191c;overflow-wrap:anywhere;}
body.aow-masters-theme button.aow-clan-member {width:100%;text-align:left;color:#deeeec;background:#081d21;cursor:pointer;border-radius:0;font:inherit;}
body.aow-masters-theme button.aow-clan-member:hover {border-color:#9cd9d3;background:#17383a;}
.aow-points-info {flex:1 0 100%;border:1px solid #527c80;padding:14px;background:#071c1e;}
.aow-points-info summary {cursor:pointer;color:#acddd7;font-weight:700;}
.aow-points-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px;margin:14px 0;}
.aow-points-grid>div {border:1px solid #365d63;padding:10px;}
@media(max-width:600px){body.aow-masters-theme #match-schedule-modal .chat-message-modal-panel {padding:16px!important;}body.aow-masters-theme .match-schedule-guide-grid {grid-template-columns:1fr!important;}.aow-public-card {padding:16px;}}

body.aow-masters-theme #match-setup-modal .match-chat-panel {background:repeating-linear-gradient(0deg,#0000 0 3px,#0002 3px 4px),linear-gradient(135deg,#143238,#041215)!important;border:1px solid #609b9c!important;border-radius:0!important;}
body.aow-masters-theme #match-setup-modal :is(.match-chat-header,.card,.ms-warning) {background-color:#0a2327!important;border-radius:0!important;border-color:#527f83!important;}
body.aow-masters-theme #match-setup-modal :is(.match-chat-kicker,.match-chat-versus,.match-chat-versus span) {color:#b7d9d5!important;}
body.aow-masters-theme #match-schedule-modal div[style*="border-radius"] {border-radius:0!important;}
body.aow-masters-theme :is(.chat-participants-button,.aow-chat-header-button--participants,.chat-participant-team,.chat-participant-staff,.match-schedule-slot) {border-radius:0!important;}
body.aow-masters-theme :is(.chat-participants-button,.aow-chat-header-button--participants) {background:linear-gradient(#285f68,#0a2529)!important;border:1px solid #6fa8a7!important;color:#edf6f2!important;box-shadow:inset 0 1px 0 #a3d7cd66!important;}

/* Geometry must settle before connector measurements; never animate card top/height. */
body.aow-masters-theme .dynamic-tree .tournament-match {transition:border-color .15s,box-shadow .15s,background-color .15s!important;}
body.aow-masters-theme .dynamic-tree :is(.round-matches,.round-heading) {transition:none!important;}
body.aow-masters-theme #match-schedule-modal .phase5c-team {border-radius:0!important;background:#071c20!important;}

body.aow-masters-theme :is(.scheduler-mode-badge,.scheduler-status-badge,.scheduler-submissions-table-wrap,.scheduler-empty-state) {border-radius:0!important;}
body.aow-masters-theme .scheduler-round-chip span {border-radius:0!important;background:linear-gradient(#153a40,#071f23)!important;border:1px solid #507f83!important;color:#d5e7e4!important;}
body.aow-masters-theme .scheduler-round-chip input:checked+span {background:linear-gradient(#527f6e,#305a4c)!important;border-color:#8dbda6!important;color:#f5fff8!important;}
body.aow-masters-theme .scheduler-round-chip input:focus-visible+span {outline:2px solid #90dedb!important;outline-offset:3px;}
body.aow-masters-theme .scheduler-submissions-table-wrap {border:1px solid #436c71!important;background:#061b1f!important;}
