/*
  ART OF WAR / GLOBAL CONFLICT — GAME UI RESTYLE V11
  Reference: user-provided in-game HUD/settings captures and user-provided
  Refrigerator Deluxe typeface.  Presentation only; keep application hooks,
  bracket positioning, table semantics and all original routes intact.
  Load AFTER page-local template styles (base.html footer) intentionally.
  Font binaries are not distributed with this source package: place copies
  of your licensed fonts in /static/fonts/ on your own server.
*/
@font-face{font-family:'Refrigerator';src:url('/static/fonts/Refrigerator Deluxe Light.otf') format('opentype');font-weight:300;font-style:normal;font-display:swap}
@font-face{font-family:'Refrigerator';src:url('/static/fonts/Refrigerator Deluxe.otf') format('opentype');font-weight:400 500;font-style:normal;font-display:swap}
@font-face{font-family:'Refrigerator';src:url('/static/fonts/Refrigerator Deluxe Bold.otf') format('opentype');font-weight:600 700;font-style:normal;font-display:swap}
@font-face{font-family:'Refrigerator';src:url('/static/fonts/Refrigerator Deluxe Extrabold.otf') format('opentype');font-weight:800;font-style:normal;font-display:swap}
@font-face{font-family:'Refrigerator';src:url('/static/fonts/Refrigerator Deluxe Heavy.otf') format('opentype');font-weight:900;font-style:normal;font-display:swap}

body.aow-masters-theme {
 --bg:#071011;--panel:#101c1e;--panel2:#1a3437;--text:#e9f2ef;--muted:#a1b7b7;
 --line:#355c60;--accent:#55b8bd;--good:#7cce92;--warn:#e4c64b;--bad:#e36b67;
 --aow-gold:#f0c83f;--aow-teal:#78cdd0;--aow-ink:#e6f1ee;--aow-dim:#a9c1c0;
 --aow-border:#436f74;--aow-border-bright:#83d1d3;
 --aow-heading:'Refrigerator','Barlow Condensed','Arial Narrow',sans-serif;
 --aow-body:'Refrigerator','Roboto Condensed','Arial Narrow',sans-serif;
 --game-charcoal:#071012;--game-panel:#132529;--game-panel-hi:#1e4247;
 --game-ridge:#74c4c8;--game-gold:#e8bb22;--game-danger:#bf514f;
 font-family:var(--aow-body)!important;font-size:19px;font-weight:500;
 color:#e5f0ed!important;line-height:1.3;letter-spacing:.012em;
 background:#050d0f url('/static/tournament-background.jpg') center top/cover fixed no-repeat;
}
body.aow-masters-theme :is(button,input,select,textarea,option,label,table){font-family:var(--aow-body)!important}
body.aow-masters-theme :is(p,span,small,td,th,li,label,div){text-wrap:pretty}
body.aow-masters-theme .page-backdrop{background:linear-gradient(180deg,rgba(0,10,11,.77),rgba(0,13,15,.86) 48%,rgba(0,9,11,.96))!important;backdrop-filter:none!important}
body.aow-masters-theme .mobile-battlefield{opacity:.26!important}
body.aow-masters-theme ::selection{background:#267780;color:#fff}
body.aow-masters-theme :focus-visible{outline:2px solid #8ed9d8!important;outline-offset:2px!important}

/* The genuine AOW UI uses an industrial condensed display family throughout. */
body.aow-masters-theme :is(h1,h2,h3,h4,h5,h6,.brand,.metric,.stat-value,strong,b,.btn,button,.tag,.badge,
 .status,.eyebrow,.round-heading,.portal-menu-label,.portal-menu-number,.ms-field-label,
 .brn-tab,.brn-current,.sat-filter,.ms-bulk-filter,.team-score,.faction-copy strong,
 .ms-option-name,.ms-bo-round-card-main,.ms-picker-history-title,.admin-tool,
 .notif-quick-filter,.portal-select-trigger,.aow-select-trigger,.ms-ui-select-trigger,
 .ms-custom-select-trigger,.bracket-format-trigger,.bracket-format-option,
 .p6e-heading,.p6f-editor-hold-title,.tournament-chat-heading){
 font-family:var(--aow-heading)!important;
}
body.aow-masters-theme :is(h1,h2,h3,h4,h5,h6){color:#e6f2f1!important;font-weight:800!important;line-height:1.03!important;letter-spacing:.045em!important;text-shadow:0 1px 1px #000}
body.aow-masters-theme h1{font-size:clamp(42px,5.5vw,76px)!important}
body.aow-masters-theme h2{font-size:clamp(32px,3.5vw,47px)!important}
body.aow-masters-theme h3{font-size:clamp(25px,2.7vw,34px)!important}
body.aow-masters-theme :is(.eyebrow,.ms-field-label,.field>label,.public-setup-label,
 .schedule-section-label,.ms-bulk-field-label,.scheduler-form-section-title,
 .notif-upload-field>label,.private-setting-label){
 font-size:16px!important;font-weight:800!important;letter-spacing:.11em!important;
 color:#76cacc!important;text-transform:uppercase!important;
}
body.aow-masters-theme :is(.small,small,.muted,.footer,.field small,
 .ms-option-desc,.ms-bulk-description,.portal-menu-help,.admin-page-head p){
 color:#adc1c1!important;font-size:clamp(16px,1.12vw,17px);
}
body.aow-masters-theme :is(.badge,.tag,.status,.ms-status,.ms-reason-pill,.ms-final-pill,
 .bo-chip,.brn-round-number,.ms-bulk-result-pill){
 font-weight:800!important;letter-spacing:.06em;line-height:1.15;
 border-radius:2px!important;text-shadow:none!important;
}

/* Patterned bars, metal insets and squared game panels, not generic app cards. */
body.aow-masters-theme :is(.card,.match-setup-panel,.ms-bulk-panel,.ms-bulk-settings,.ms-bulk-progress-panel,
 .ms-bulk-progress-match,.ms-selection-card,.ms-rule-card,.ms-bo-round-card,.ms-bo-round-editor,
 .private-admin-card,.tournament-private-admin .card,.notif-retry-panel,
 .notification-detail-card,.notif-upload-box,.tournament-chat-shell,.tournament-chat-card,
 .p6e-timeline,.p6f-editor-hold-panel,.sat-panel,.sat-card,.scheduler-panel,
 .scheduler-form-section,.admin-team-card,.result-card,.participant-team-card,
 .portal-modal-card,.v9-auth-card,.v9-connect-card,.portal-menu-panel){
 color:#dceceb!important;
 background:linear-gradient(150deg,rgba(24,52,54,.97),rgba(8,22,24,.985) 50%,rgba(6,16,18,.99))!important;
 border:1px solid #43686c!important;border-radius:2px!important;
 box-shadow:inset 0 1px 0 rgba(168,233,226,.16),0 6px 22px rgba(0,0,0,.32)!important;
 backdrop-filter:none!important;
}
body.aow-masters-theme :is(.card,.match-setup-panel,.ms-bulk-panel,.private-admin-card,
 .p6e-timeline,.tournament-chat-shell,.portal-modal-card,.notif-retry-panel,.scheduler-panel) {
 background-image:repeating-linear-gradient(0deg,transparent 0 3px,rgba(0,0,0,.075) 3px 4px),linear-gradient(155deg,rgba(22,50,52,.98),rgba(7,21,24,.985) 60%,rgba(5,16,18,.99))!important;
}
body.aow-masters-theme :is(.ms-bulk-match,.ms-bulk-progress-toggle,.ms-history-row,
 .ms-option-card,.ms-option-summary,.notification-team-option,.notification-status-card,
 .notify-team-row,.result-team-row,.private-codes-table,.chat-message-bubble,.chat-history-message,
 .sat-match-card,.sat-row,.p6e-match,.admin-tool,.faction,.faction-card){
 border-radius:2px!important;box-shadow:none!important;
}
body.aow-masters-theme :is(.section,.registration-section){scroll-margin-top:20px}

/* Header / side drawer resemble the original game's tactical HUD. */
body.aow-masters-theme .portal-nav{
 background:repeating-linear-gradient(115deg,transparent 0 3px,rgba(130,197,190,.043) 3px 5px),linear-gradient(180deg,#101f21,#081416)!important;
 border:1px solid #446a6e!important;border-bottom:3px solid #2d5b61!important;
 border-radius:0!important;min-height:70px;
 box-shadow:inset 0 1px 0 #6b9a99,0 10px 24px rgba(0,0,0,.32)!important;
}
body.aow-masters-theme .portal-nav .brand{font-size:clamp(23px,2.2vw,32px)!important;letter-spacing:.08em!important;font-weight:900!important;color:#f5faf5!important}
body.aow-masters-theme .portal-nav .brand span{color:#8ccfd0!important}
body.aow-masters-theme .portal-menu-head{background:repeating-linear-gradient(115deg,rgba(95,147,147,.065) 0 2px,transparent 2px 5px),#10292c!important}
body.aow-masters-theme .portal-menu-links a{background:#0a1d1f!important;border:1px solid #2d5355!important;border-radius:0!important}
body.aow-masters-theme .portal-menu-links a:hover{color:#edcf70!important;border-color:#88acaa!important;background:#183a3d!important}
body.aow-masters-theme :is(.portal-menu-number,.menu-icon i){color:#80c8c8!important}

/* Bevelled interactive controls inspired by AOW Settings / Battle buttons. */
body.aow-masters-theme :is(.btn,button.btn,.ms-action,.ms-bulk-button,
 .admin-back-btn,.menu-toggle,.menu-close,.brn-tab,.sat-filter,
 .notif-quick-filter,.p6e-actions button,.portal-select-trigger,
 .aow-select-trigger,.ms-ui-select-trigger,.ms-custom-select-trigger,
 .bracket-format-trigger,.bracket-team-picker-trigger){
 border-radius:1px!important;font-size:17px!important;font-weight:800!important;letter-spacing:.035em!important;
 color:#e8f4f1!important;
 background:linear-gradient(180deg,#255a61 0%,#194247 48%,#112e33 52%,#18383b 100%)!important;
 border:1px solid #5c989d!important;
 box-shadow:inset 0 1px 0 rgba(198,255,249,.32),inset 0 -2px 0 rgba(3,17,19,.73),0 1px 0 rgba(0,0,0,.7)!important;
 text-shadow:0 1px 1px #061516!important;
 transition:background .12s ease,border-color .12s ease,filter .12s ease;
}
body.aow-masters-theme :is(.btn,button,.ms-action,.menu-toggle):hover:not(:disabled){filter:brightness(1.12)}
body.aow-masters-theme :is(.btn.primary,.btn.good,.btn.register-submit,.btn.login,
 .notif-send-btn,.notification-send-btn,.ms-bulk-start-button){
 background:linear-gradient(180deg,#2f767b,#226269 45%,#194e55 48%,#24656c)!important;
 border-color:#86c9c8!important;color:#f4fcf7!important;
}
body.aow-masters-theme :is(.btn.bad,.btn.danger,.danger-action,.ms-action.danger,
 .btn.danger-action,.btn.delete){
 color:#ffd9ce!important;border-color:#a65b58!important;
 background:linear-gradient(180deg,#5b2b2b,#391a1e)!important;
}
body.aow-masters-theme :is(.btn:disabled,button:disabled){opacity:.52;filter:grayscale(.3);cursor:not-allowed}
body.aow-masters-theme :is(.portal-toast,.flash){border-radius:1px!important;border-color:#668880!important;background:#1b3437!important}

/* The yellow / gold active selection, as used in the game's navigation. */
body.aow-masters-theme :is(.brn-tab.active,.sat-filter.active,.sat-filter[aria-pressed='true'],
 #bulk-round-filters .ms-bulk-filter.active,#bulk-progress-filters .ms-bulk-filter.active,
 .ms-bulk-filter.active,.notif-quick-filter.active,.brn-tab[aria-selected='true'],
 .scheduler-tab.active,.admin-tab.active,.portal-tab.active,.round-tab.active,
 .ms-ui-select-option.selected,.aow-select-option.selected,.bracket-format-option.selected){
 color:#ffe18a!important;border-color:#d5b443!important;
 background:linear-gradient(180deg,rgba(130,97,22,.45),rgba(54,42,18,.9))!important;
 box-shadow:inset 0 1px 0 rgba(255,231,133,.32),inset 0 -2px 0 #bf9a2d!important;
}
body.aow-masters-theme :is(.brn-tab,.ms-bulk-filter,.sat-filter,.round-tab,.scheduler-tab){white-space:nowrap}
body.aow-masters-theme :is(.bo-chip,.ms-bulk-score,.team-score,.brn-current,.brn-round-number,
 .public-era-game small,.round-label,.round-number,.round-heading small){color:#f3cb4a!important}
body.aow-masters-theme :is(.tag.confederation,.faction-conf,.confederation-card){--faction-glow:#317b98}
body.aow-masters-theme :is(.tag.resistance,.faction-res,.resistance-card){--faction-glow:#ac464b}

/* Form elements / opt-ins / number steppers / date time fields. */
body.aow-masters-theme :is(input:not([type='checkbox']):not([type='radio']):not([type='file']),
 textarea,select,.field input,.field select,.field textarea,.ms-input,.ms-select,
 .portal-number-wrap,.notif-log-filter,input[type='date'],input[type='datetime-local'],input[type='time']){
 background:#071719!important;color:#ecf7f2!important;border:1px solid #517a7c!important;
 border-radius:1px!important;box-shadow:inset 0 1px 5px rgba(0,0,0,.43)!important;
 font-size:18px!important;min-height:40px;
}
body.aow-masters-theme :is(input,textarea)::placeholder{color:#9fb7b6!important}
body.aow-masters-theme :is(input:not([type='checkbox']):not([type='radio']),textarea,select):focus{
 border-color:#93d6d6!important;box-shadow:0 0 0 1px #63a9a7,inset 0 1px 5px #0008!important;
 outline:none!important;
}
body.aow-masters-theme :is(.portal-number-stepper,.ms-field){border-radius:0!important}
body.aow-masters-theme :is(input[type='checkbox'],input[type='radio']){accent-color:#5cb7ba}
body.aow-masters-theme :is(.ms-switch-track,.private-switch-track,.toggle-track){border-radius:2px!important;background:#384b50!important}
body.aow-masters-theme :is(.ms-switch input:checked + .ms-switch-track,
 .private-switch input:checked + .private-switch-track){background:#277c72!important}
body.aow-masters-theme input[type='datetime-local']::-webkit-calendar-picker-indicator,
body.aow-masters-theme input[type='date']::-webkit-calendar-picker-indicator{filter:invert(88%) sepia(12%) saturate(840%) hue-rotate(120deg)}
body.aow-masters-theme :is(.aow-select,.ms-ui-select,.ms-custom-select,.portal-select){min-width:0}
body.aow-masters-theme :is(.aow-select-trigger,.ms-ui-select-trigger,.ms-custom-select-trigger,.portal-select-trigger){min-height:40px!important;text-align:left!important}
body.aow-masters-theme :is(.aow-select-menu,.ms-ui-select-menu,.ms-custom-select-options,
 .portal-select-menu,.bracket-format-menu,.bracket-team-picker-menu){
 background:#08191b!important;border:1px solid #70a9ac!important;border-radius:1px!important;
 box-shadow:0 8px 20px #0009,inset 0 1px 0 #5b8985!important;color:#d8eeeb!important;
}
body.aow-masters-theme :is(.aow-select-option,.ms-ui-select-option,.ms-custom-select-option,
 .portal-select-option,.bracket-format-option){font-size:17px!important;border-radius:0!important}
body.aow-masters-theme :is(.aow-select-option,.ms-ui-select-option,.ms-custom-select-option,
 .portal-select-option,.bracket-format-option):hover:not(:disabled){background:#245056!important;color:#fff!important}
body.aow-masters-theme :is(.aow-native-select-enhanced,select.ms-backed-select){position:absolute!important;inline-size:1px!important;block-size:1px!important;opacity:0!important;pointer-events:none!important;clip-path:inset(50%)}
body.aow-masters-theme :is(.ms-option-card,.ms-selection-card,.ms-bo-default-heading,
 .ms-bulk-match,.ms-bulk-progress-match,.ms-bulk-mode,.private-setting-row,.admin-tool){
 border-color:#456d70!important;background:#0b1e21!important;
}
body.aow-masters-theme .ms-bulk-match:has(input:checked),
body.aow-masters-theme .ms-bulk-mode:has(input:checked){border-color:#a9c58c!important;background:#153337!important}
body.aow-masters-theme :is(.ms-selection-card .selected,.ms-selection-map.selected){border-color:#e0b93a!important}

/* Bracket: do not alter columns, nodes, connectors, grid or match positioning. */
body.aow-masters-theme :is(.tournament-match,.public-match-card,.bracket-match,
 .bracket-team-card,.public-match-card .team-slot){
 border-radius:1px!important;border-color:#41646a!important;box-shadow:inset 0 1px 0 #33575b,0 5px 13px #0006!important;
}
body.aow-masters-theme .tournament-match{background:#08191e!important}
body.aow-masters-theme :is(.tournament-match-head,.round-heading){
 color:#b5cdcb!important;background:repeating-linear-gradient(115deg,transparent 0 4px,rgba(136,183,185,.055) 4px 6px),#10272b!important;
 border-color:#355c5f!important;
}
body.aow-masters-theme :is(.team-slot.faction-conf,.faction-conf .team-slot){background:linear-gradient(90deg,#173640,#0b222b)!important}
body.aow-masters-theme :is(.team-slot.faction-res,.faction-res .team-slot){background:linear-gradient(90deg,#392124,#221517)!important}
body.aow-masters-theme :is(.team-score,.team-point){font-size:23px!important;color:#ecc13b!important}
body.aow-masters-theme .bracket-scroll{scrollbar-color:#649fa4 #071719!important}
body.aow-masters-theme .public-era-game{border-radius:1px!important;border-color:#34585c!important;background:#12292c!important}
body.aow-masters-theme .public-era-game small{color:#e6c542!important}
body.aow-masters-theme .brn-round-navigator{border-color:#466a6c!important;border-radius:1px!important}

/* Game console widgets for player/staff messages and notification screens. */
body.aow-masters-theme :is(.chat-message-bubble,.chat-history-message,.chat-message-modal-panel,
 .tournament-chat-message,.notification-status-card,.notification-channel,.notification-detail-card,
 .notif-log-card,.notif-log-item,.notif-upload-box,.notif-upload-trigger,.notif-retry-panel,
 .ms-history-row,.p6e-match,.schedule-slot,.chat-attachment,.chat-message-attachment){
 border-radius:1px!important;border-color:#426469!important;
}
body.aow-masters-theme :is(.chat-message-bubble,.chat-history-message,.tournament-chat-message,
 .notif-log-card,.notif-log-item,.ms-history-row){background:#0b1d20!important}
body.aow-masters-theme :is(.chat-message-meta,.chat-message-timestamp,.chat-history-time){color:#91afb0!important}
body.aow-masters-theme :is(.chat-message-staff,.tournament-staff-message){border-left:3px solid #cfae48!important}
body.aow-masters-theme :is(.chat-message-content,.chat-message-body,.tournament-chat-messages){font-size:18px!important}
body.aow-masters-theme :is(.p6e-timeline,.p6f-editor-hold-panel,.ms-bulk-progress-panel,
 .ms-bulk-settings,.match-setup-panel){border-top-color:#618e90!important}
body.aow-masters-theme :is(.notif-upload-icon,.portal-modal-icon,.notification-channel-icon){border-radius:1px!important}
body.aow-masters-theme :is(.notif-live-indicator,.ms-status.active,.status.approved){color:#8ed8aa!important}

/* More dense, crisp HUD framing on the otherwise unchanged page structure. */
body.aow-masters-theme :is(.admin-page-head,.match-setup-panel-head,.registration-heading,
 .private-setting-heading,.portal-menu-head){border-bottom-color:#456a6c!important}
body.aow-masters-theme :is(.admin-page-head .eyebrow,.section>.eyebrow,
 .ms-library-title strong){letter-spacing:.1em!important}
body.aow-masters-theme :is(.ms-bulk-progress-totals>div,.stat,.metric-card,
 .notif-retry-summary>div,.ms-bulk-progress-game){
 border-color:#375e60!important;border-radius:1px!important;
 background:linear-gradient(180deg,#122a2e,#081a1e)!important;
}
body.aow-masters-theme :is(.portal-modal-card,.ms-bulk-dialog,.chat-message-modal-panel){
 border:2px solid #5e9597!important;background:linear-gradient(180deg,#1a3336,#071719)!important;
}
body.aow-masters-theme .footer{color:#8ba7a8!important;letter-spacing:.07em!important}
body.aow-masters-theme :is(.portal-menu-panel,.aow-select-menu,.ms-ui-select-menu,
 .ms-custom-select-options,.ms-bulk-list,.tournament-chat-messages,
 .tournament-chat-body,.chat-history-content,.portal-modal-card){scrollbar-color:#477f83 #071416!important}
body.aow-masters-theme :is(.portal-menu-panel,.ms-bulk-list,.tournament-chat-messages,
 .tournament-chat-body,.chat-history-content)::-webkit-scrollbar-thumb{
 border-radius:0!important;background:#4a8b8d!important;
}

/* Mobile restores the original bounded scrollport (not a page-wide lock).
   Modal and dedicated chat scroll surfaces retain their own behavior. */
@media(max-width:760px){
 body.aow-masters-theme:not(.tournament-chat-view) > .wrap{
  position:absolute!important;inset:0!important;width:100%!important;max-width:100%!important;
  height:100%!important;max-height:100dvh!important;margin:0!important;
  padding-inline:4%!important;overflow-y:auto!important;overflow-x:hidden!important;
  overscroll-behavior-y:auto!important;-webkit-overflow-scrolling:touch!important;
 }
 body.aow-masters-theme.tournament-chat-view > .wrap{position:relative!important}
 body.aow-masters-theme .portal-nav{min-height:58px!important}
 body.aow-masters-theme :is(h1,.hero h1){font-size:clamp(34px,9vw,52px)!important}
 body.aow-masters-theme :is(h2,.section h2){font-size:clamp(28px,7vw,38px)!important}
 body.aow-masters-theme :is(.btn,button,.ms-action,.aow-select-trigger){font-size:16px!important}
 body.aow-masters-theme :is(.grid,.two,.factions){min-width:0}
 body.aow-masters-theme .card{padding:clamp(12px,3.6vw,20px)}
}
@media(prefers-reduced-motion:reduce){body.aow-masters-theme :is(.btn,button,.card,.tournament-match){transition:none!important}}

/* Page-local feature tokens. These are inherited by the original components
   so even deeply nested controls retain the game palette. */
body.aow-masters-theme .match-setup-page{
 --ms-panel:#0d2427;--ms-panel-strong:#153033;--ms-inner:#081b1d;
 --ms-line:#426e71;--ms-line-strong:#649496;--ms-text:#e3f1ee;
 --ms-muted:#acc5c4;--ms-accent:#69c0c4;--ms-gold:#eac13e;
 --ms-gold-soft:rgba(218,180,49,.19);
}
body.aow-masters-theme .p6e-timeline{--p6e-accent:#7fcdcf;--p6e-border:#456a6e;--p6e-muted:#b0c7c6}

/* Remaining legacy elements that previously had their own blue/purple page CSS. */
body.aow-masters-theme :is(.ms-option-summary,.ms-library-title,.ms-bulk-head,
 .ms-bulk-progress-head,.ms-picker-history-title,.private-admin-card-head,
 .notification-team-toolbar,.notif-log-head,.tournament-chat-head,
 .tournament-chat-topbar,.p6e-head,.sat-head,.ms-bo-default-heading){
 background:repeating-linear-gradient(115deg,transparent 0 4px,rgba(105,174,172,.05) 4px 6px),#10282b!important;
 border-color:#4a7578!important;
}
body.aow-masters-theme :is(.ms-option-card,.ms-bo-round-overrides,.ms-bo-round-editor,
 .ms-bulk-progress-game,.notif-log-row,.private-setting-row,.notification-status-card,
 .notification-channel,.ms-bulk-match-label,.team-info-roster,.team-info-section){
 background:#0a1e21!important;border-color:#395f62!important;box-shadow:none!important;
}
body.aow-masters-theme :is(.notif-quick-filter,.ms-bulk-filter,.brn-tab,.sat-filter,
 .tournament-chat-control,.chat-message-action,.notif-log-actions .btn){border-radius:1px!important}
body.aow-masters-theme :is(table,.table,.private-codes-table,.audit-table){border-collapse:collapse}
body.aow-masters-theme :is(table,.table,.private-codes-table,.audit-table) th{
 background:#183337!important;color:#a6dadd!important;
 border-color:#3a6164!important;font-weight:800!important;font-family:var(--aow-heading)!important;
 letter-spacing:.09em!important;text-transform:uppercase;
}
body.aow-masters-theme :is(table,.table,.private-codes-table,.audit-table) td{border-color:#2d5357!important}
body.aow-masters-theme :is(table,.table,.private-codes-table,.audit-table) tr:hover td{background:rgba(47,105,109,.13)}
body.aow-masters-theme :is(details,summary){scroll-margin-top:12px}
body.aow-masters-theme summary{cursor:pointer}
body.aow-masters-theme :is(.ms-option-summary,summary.ms-option-summary,
 .ms-rule-card summary,.private-admin-card summary):hover{background:#1d4145!important}
body.aow-masters-theme :is(.ms-field-label,.private-setting-help,.ms-full-series-explainer){line-height:1.35!important}
body.aow-masters-theme :is(.portal-number-stepper button,.chat-attach-btn,
 .chat-emoji-btn,.notif-upload-trigger,.ms-history-action,
 .private-copy-code,.ms-small-action){
 border-radius:1px!important;border-color:#5e9699!important;
 color:#e5f2ed!important;background:linear-gradient(180deg,#1a454a,#10292d)!important;
}
body.aow-masters-theme :is(.ms-status,.tag,.badge,.private-status-pill,
 .ms-bulk-progress-status,.p6e-count){border-radius:1px!important}
body.aow-masters-theme :is(.ms-bulk-dialog,.chat-message-modal-panel,
 .portal-modal-card,.notif-detail-modal,.notification-detail-modal){
 border-radius:1px!important;background:#0b1e20!important;border:2px solid #639b9e!important;
}
body.aow-masters-theme :is(.notif-upload-trigger:hover,.ms-option-summary:hover,
 .private-admin-card:hover,.notification-team-option:hover){border-color:#7dbabc!important}
body.aow-masters-theme :is(.ms-selection-card .ms-option-thumb,
 .ms-option-thumb,.participants-faction-title img,.team-avatar,
 .participant-team-logo){border-radius:1px!important}

/* ================================================================
   V11.1 — AOW Game UI detail pass
   Previously omitted page-local components. Pure styling: no
   application routes, selects, date-pickers or dialog hooks change.
   This is loaded after template-level CSS through base.html.
   ================================================================ */

/* Shared game components: readable labels and HUD metadata. */
body.aow-masters-theme :is(.notif-detail-head,.notif-media-viewer-toolbar,.p6g-toolbar,
 .results-place-admin-head,.admin-control-card .field>label){color:#d9eeeb!important}
body.aow-masters-theme :is(.notif-detail-panel,.notif-media-viewer-panel,
 .p6g-shell,.tournament-results-admin .results-admin-place){
 border:1px solid #527f82!important;border-radius:2px!important;
 background:linear-gradient(160deg,#183236 0%,#0a1d20 56%,#071416 100%)!important;
 box-shadow:inset 0 1px 0 rgba(171,230,225,.17),0 14px 32px rgba(0,0,0,.5)!important;
}

/* Notification delivery details: remove leftover purple popup chrome. */
body.aow-masters-theme .notif-detail-panel{color:#e8f3ef!important}
body.aow-masters-theme .notif-detail-head,
body.aow-masters-theme .notif-detail-foot{
 background:repeating-linear-gradient(120deg,transparent 0 5px,rgba(140,196,197,.05) 5px 7px),#12272b!important;
 border-color:#41666a!important;
}
body.aow-masters-theme .notif-detail-head .eyebrow{color:#81cdd0!important}
body.aow-masters-theme .notif-detail-head h3{font-size:30px!important;letter-spacing:.035em}
body.aow-masters-theme .notif-detail-close,
body.aow-masters-theme .notif-media-viewer-close{
 border:1px solid #5c9798!important;border-radius:1px!important;
 color:#eaf6f2!important;background:linear-gradient(#224c51,#10292d)!important;
}
body.aow-masters-theme .notif-detail-close:hover,
body.aow-masters-theme .notif-media-viewer-close:hover{border-color:#a0d9d7!important;color:#fff!important}
body.aow-masters-theme .notif-detail-metadata div{
 min-width:0;border:1px solid #3c6063!important;border-radius:1px!important;
 background:linear-gradient(180deg,#122a2c,#0a1c1f)!important;
}
body.aow-masters-theme .notif-detail-metadata span,
body.aow-masters-theme .notif-detail-section>span{
 color:#85c8ca!important;font-size:18px!important;letter-spacing:.09em!important;
}
body.aow-masters-theme .notif-detail-metadata strong{color:#e3f2ef!important;font-size:17px!important;line-height:1.3!important}
body.aow-masters-theme .notif-detail-subject{font-size:23px!important;color:#eff8f3!important}
body.aow-masters-theme .notif-detail-body{
 background:#071618!important;color:#dfefeb!important;border:1px solid #385b5e!important;
 border-radius:1px!important;font-size:17px!important;line-height:1.45!important;
}
body.aow-masters-theme .notif-detail-note{color:#97b7b7!important;font-size:18px!important}
body.aow-masters-theme :is(.notif-detail-content,.notif-detail-body,.notif-media-viewer-stage,
 .notif-detail-panel,.notif-media-viewer-panel){scrollbar-color:#56999d #081719!important}
body.aow-masters-theme :is(.notif-detail-content,.notif-detail-body,.notif-media-viewer-stage)::-webkit-scrollbar-thumb{background:#528e92!important;border-radius:1px!important}
body.aow-masters-theme .notif-media-tile{
 background:#0c2427!important;border:1px solid #476e72!important;border-radius:1px!important;color:#e5f5ee!important;
}
body.aow-masters-theme .notif-media-tile:hover{background:#1a4043!important;border-color:#83c8ca!important}
body.aow-masters-theme .notif-media-viewer-backdrop{background:rgba(2,9,11,.91)!important}
body.aow-masters-theme :is(.notif-media-viewer-navigation button,.notif-media-viewer-panel){border-radius:1px!important}
body.aow-masters-theme .notif-media-viewer-navigation button{
 color:#e6f5ed!important;border-color:#4d8688!important;background:#17383b!important;
}

/* Notification log filters and attachment widgets. */
body.aow-masters-theme :is(.notif-log-search-label,.notif-upload-box,.notif-upload-item,
 .notif-retry-summary>div){background:#0b1f22!important;border-color:#3f686b!important;border-radius:1px!important}
body.aow-masters-theme .notif-log-search-label:focus-within{border-color:#8dd4d2!important}
body.aow-masters-theme .notif-quick-filter span{color:#e4d18d!important;background:#25382f!important;border-radius:1px!important}
body.aow-masters-theme .notif-row-actions .notif-view-message{border-color:#5b9597!important;color:#d5efed!important}
body.aow-masters-theme .notif-upload-summary{color:#8ad0cd!important}
body.aow-masters-theme .notif-upload-fileicon{background:#204447!important;color:#c1ede7!important}

/* Final placement: dedicated override picker was still purple. */
body.aow-masters-theme .tournament-results-admin .results-admin-place{
 border-color:#4d777a!important;box-shadow:inset 0 1px 0 #557a79!important;
}
body.aow-masters-theme .tournament-results-admin .results-placement-number{
 border:1px solid #527c7e!important;border-radius:1px!important;background:#193338!important;
 color:#f1d47d!important;
}
body.aow-masters-theme .tournament-results-admin .results-auto-team-box{
 background:#071719!important;border-color:#395d60!important;border-radius:1px!important;
}
body.aow-masters-theme .tournament-results-admin .results-auto-team-label{color:#8cc4c4!important;font-size:17px!important}
body.aow-masters-theme .tournament-results-admin .results-auto-team-value small{color:#98b5b4!important}
body.aow-masters-theme .results-custom-select-trigger{
 border:1px solid #5e9497!important;border-radius:1px!important;
 background:linear-gradient(180deg,#20464b,#0d282b)!important;
 color:#e8f5f1!important;
 box-shadow:inset 0 1px 0 #729d9a,inset 0 -2px 0 #081a1b!important;
 font-size:18px!important;
}
body.aow-masters-theme .results-custom-select-trigger:hover,
body.aow-masters-theme .results-custom-select.open .results-custom-select-trigger{
 background:#1b4145!important;border-color:#99d0ce!important;
 box-shadow:0 0 0 1px #88c5c3!important;
}
body.aow-masters-theme .results-custom-select-arrow{border-color:#9ddbd6!important}
body.aow-masters-theme .results-custom-select-menu{
 border:1px solid #6fa3a3!important;border-radius:1px!important;
 background:#081b1e!important;box-shadow:0 16px 35px #000b!important;
 scrollbar-color:#538e91 #061718!important;
}
body.aow-masters-theme .results-custom-select-menu::-webkit-scrollbar-thumb{background:#518d91!important;border-radius:1px!important}
body.aow-masters-theme .results-custom-select-option{
 color:#e2efec!important;border-radius:1px!important;background:transparent!important;
 font-size:18px!important;min-height:42px!important;
}
body.aow-masters-theme .results-custom-select-option:hover,
body.aow-masters-theme .results-custom-select-option:focus-visible{
 color:#fff!important;background:#1a4244!important;
}
body.aow-masters-theme .results-custom-select-option.selected{
 color:#ffdf7f!important;background:linear-gradient(90deg,#52431c,#252b1d)!important;
 box-shadow:inset 3px 0 #e3b93d!important;
}
body.aow-masters-theme .results-custom-select-option[data-empty='1']{color:#a3bdba!important}

/* Audit Log: own custom picker and table, previously navy/purple. */
body.aow-masters-theme .p6g-audit{--p6g-line:#395e62;--p6g-muted:#abc6c4}
body.aow-masters-theme .p6g-shell{overflow:visible!important}
body.aow-masters-theme .p6g-toolbar{border-color:#42696d!important;background:#11282c!important}
body.aow-masters-theme .p6g-toolbar :is(label,.p6g-field-label){color:#9bd5d3!important;font-size:18px!important}
body.aow-masters-theme .p6g-toolbar input{
 border-color:#537e80!important;border-radius:1px!important;background:#081a1d!important;color:#ecf6f3!important;
 font-size:18px!important;
}
body.aow-masters-theme .p6g-picker-trigger{
 width:100%;color:#e8f4f0!important;font-size:18px!important;
 border:1px solid #649da1!important;border-radius:1px!important;
 background:linear-gradient(180deg,#245258,#122f32)!important;
 box-shadow:inset 0 1px 0 #648f91,inset 0 -2px 0 #081c1d!important;
}
body.aow-masters-theme .p6g-picker-trigger:hover,
body.aow-masters-theme .p6g-picker-trigger[aria-expanded='true']{
 border-color:#97cecf!important;background:#1c4549!important;
}
body.aow-masters-theme .p6g-picker-trigger svg{color:#a8dfda!important}
body.aow-masters-theme .p6g-picker-menu{
 border:1px solid #6c9fa1!important;border-radius:1px!important;
 background:#081b1d!important;box-shadow:0 16px 32px #000c!important;
 scrollbar-color:#508e92 #081719!important;
}
body.aow-masters-theme .p6g-picker-option{
 color:#dfefea!important;background:transparent!important;
 border-radius:1px!important;font-size:18px!important;
}
body.aow-masters-theme .p6g-picker-option:hover,
body.aow-masters-theme .p6g-picker-option:focus-visible{background:#204e51!important;color:#fff!important}
body.aow-masters-theme .p6g-picker-option.is-selected{
 color:#f7d986!important;background:linear-gradient(90deg,#54441f,#272b1e)!important;
 box-shadow:inset 3px 0 #e6c244!important;
}
body.aow-masters-theme .p6g-count{
 color:#d2f2ed!important;border-color:#4c7f81!important;border-radius:1px!important;background:#18383c!important;
}
body.aow-masters-theme .p6g-table-wrap{
 border-radius:0!important;scrollbar-color:#518e91 #081719!important;
}
body.aow-masters-theme .p6g-table :is(td,th){border-color:#35595d!important}
body.aow-masters-theme .p6g-table tbody tr:hover{background:rgba(54,114,117,.23)!important}
body.aow-masters-theme .p6g-table td{color:#d6e9e5!important;font-size:17px!important}
body.aow-masters-theme .p6g-time{color:#abcbcc!important}
body.aow-masters-theme .p6g-action{
 color:#c7eeee!important;background:#1a4146!important;border-color:#4e7f83!important;
 border-radius:1px!important;font-size:16px!important;
}
body.aow-masters-theme .p6g-footer{color:#98b5b4!important}
body.aow-masters-theme .p6g-footer button{color:#b8e3e0!important}

/* Registration: date picker trigger & calendar popup must match game HUD. */
body.aow-masters-theme .portal-datetime-trigger{
 background:linear-gradient(180deg,#194045,#0c282b)!important;
 border:1px solid #628f90!important;border-radius:1px!important;
 color:#e8f4ef!important;font-size:18px!important;
 box-shadow:inset 0 1px 0 #668c8b,inset 0 -2px 0 #071a1d!important;
}
body.aow-masters-theme .portal-datetime-trigger:hover,
body.aow-masters-theme .portal-datetime-trigger:focus-visible,
body.aow-masters-theme .portal-datetime-trigger.has-value{
 background:#1b4144!important;border-color:#9acac8!important;
 box-shadow:0 0 0 1px #77adad!important;
}
body.aow-masters-theme .portal-datetime-trigger-icon{color:#a9e1db!important}
body.aow-masters-theme .portal-dt-backdrop{background:rgba(0,11,13,.86)!important}
body.aow-masters-theme .portal-dt-card{
 border:1px solid #64999a!important;border-radius:2px!important;
 background:linear-gradient(180deg,#19393c,#0a1d1f)!important;color:#e8f5f0!important;
 box-shadow:0 20px 45px #000c!important;
}
body.aow-masters-theme :is(.portal-dt-head,.portal-dt-calendar,.portal-dt-time,
 .portal-dt-current,.portal-dt-month-head,.portal-dt-time-grid){border-color:#416f70!important}
body.aow-masters-theme :is(.portal-dt-nav,.portal-dt-close,.portal-dt-time-option){
 border-radius:1px!important;border-color:#548587!important;color:#e7f2ef!important;
 background:#17383a!important;
}
body.aow-masters-theme :is(.portal-dt-day,.portal-dt-shortcuts button){border-radius:1px!important}
body.aow-masters-theme :is(.portal-dt-day.selected,.portal-dt-time-option.selected){
 color:#ffe392!important;border-color:#d8b43d!important;background:#54431c!important;
 box-shadow:inset 0 0 0 1px rgba(231,191,58,.31)!important;
}
body.aow-masters-theme :is(.portal-dt-day:hover:not(:disabled),.portal-dt-time-option:hover){
 border-color:#86c3c2!important;background:#255156!important;
}
body.aow-masters-theme :is(.portal-dt-current strong,.portal-dt-month-head strong){color:#e8f5ef!important}

/* The registration enabled switch was still an old lavender pill. */
body.aow-masters-theme .admin-registration-toggle{
 background:#0a2023!important;border:1px solid #477477!important;border-radius:1px!important;
}
body.aow-masters-theme .admin-registration-title{font-size:18px!important;color:#e7f3ef!important}
body.aow-masters-theme .admin-registration-track{
 border-radius:2px!important;border-color:#658589!important;background:#293e42!important;
}
body.aow-masters-theme .admin-registration-knob{border-radius:1px!important;background:#e3eee9!important}
body.aow-masters-theme .admin-registration-switch input:checked + .admin-registration-track{
 border-color:#a0d6c3!important;background:#247b68!important;
}
body.aow-masters-theme .admin-registration-switch input:checked ~ .admin-registration-state{color:#a6e0bd!important}
body.aow-masters-theme .admin-registration-switch input:focus-visible + .admin-registration-track{
 outline:2px solid #9ed7d5!important;outline-offset:2px!important;
}
body.aow-masters-theme .admin-registration-state{color:#a0b9b8!important;font-size:16px!important}

/* Mobile: keep all overlays scrollable without locking the full site. */
@media(max-width:700px){
 body.aow-masters-theme .notif-detail-panel{max-height:calc(100dvh - 16px)!important;min-width:0}
 body.aow-masters-theme .notif-detail-metadata{grid-template-columns:1fr!important;gap:7px!important}
 body.aow-masters-theme .notif-detail-head,
 body.aow-masters-theme .notif-detail-foot{padding:11px 12px!important}
 body.aow-masters-theme .notif-detail-content{min-height:0!important;overflow-y:auto!important}
 body.aow-masters-theme .p6g-toolbar{padding:13px!important}
 body.aow-masters-theme .p6g-picker-menu{max-height:45dvh!important;overflow-y:auto!important}
 body.aow-masters-theme .results-custom-select-menu{max-height:42dvh!important;overflow-y:auto!important}
 body.aow-masters-theme .portal-dt-card{max-height:92dvh!important;overflow-y:auto!important}
}


/* ==============================================================
   V11.2 – AOW native game-HUD consistency & bracket legibility
   Deliberately presentation-only: no bracket coordinates or handlers.
   =============================================================== */
/* The Match Management modal uses strong legacy navy styles. */
body.aow-masters-theme #shared-match-editor .match-editor-modal {
  background:repeating-linear-gradient(115deg,transparent 0 4px,rgba(115,189,185,.024) 4px 6px),linear-gradient(155deg,#152e31,#081618 67%)!important;
  border:1px solid #547e81!important;border-radius:2px!important;
  box-shadow:inset 0 1px 0 #679799,0 24px 70px #000c!important;
  scrollbar-color:#5a9293 #061619!important;
}
body.aow-masters-theme #shared-match-editor .match-editor-modal-head {
  background:repeating-linear-gradient(115deg,transparent 0 3px,rgba(126,190,187,.06) 3px 5px),linear-gradient(#1b3c3f,#0d2427)!important;
  border-bottom:1px solid #4d7578!important;backdrop-filter:none!important;
}
body.aow-masters-theme #shared-match-editor .match-editor-modal-head > div{
  display:flex!important;align-items:baseline!important;gap:7px!important;flex-wrap:wrap!important;
}
body.aow-masters-theme #shared-match-editor .match-editor-modal-head small {
  color:#8ecfca!important;font-size:17px!important;letter-spacing:.1em!important;
}
body.aow-masters-theme #shared-match-editor .match-editor-modal-head strong{
  font-family:var(--aow-heading)!important;font-size:27px!important;letter-spacing:.035em!important;color:#f0f6f2!important;
}
body.aow-masters-theme #shared-match-editor .match-editor-modal-close{
  background:linear-gradient(#1d454a,#0a2529)!important;border:1px solid #568489!important;
  border-radius:1px!important;color:#d7eeea!important;box-shadow:inset 0 1px 0 #5b8b8a!important;
}
body.aow-masters-theme #shared-match-editor :is(.bracket-edit-form,.bracket-result-form) > label{
  color:#89cecb!important;font-size:18px!important;letter-spacing:.08em!important;
}
/* Shared visual spec for *existing* independent dropdown engines. Preserve option
   markup, team/faction badges, filtering, keyboard support and selection events. */
body.aow-masters-theme :is(
 .bracket-team-picker-trigger,.bracket-format-trigger,
 .results-custom-select-trigger,.p6g-picker-trigger,
 .aow-select-trigger,.portal-select-trigger,.ms-ui-select-trigger,
 .ms-custom-select-trigger,.bracket-team-picker [data-team-trigger]
){
  box-sizing:border-box!important;border:1px solid #67999a!important;border-radius:2px!important;
  color:#f0f8f3!important;background:linear-gradient(180deg,#225157,#15383c 49%,#0d292c 50%,#1b4043)!important;
  box-shadow:inset 0 1px 0 #80adaa,inset 0 -2px 0 #061718!important;
  font-family:var(--aow-heading)!important;font-size:19px!important;line-height:1.1!important;
}
body.aow-masters-theme :is(
 .bracket-team-picker.open .bracket-team-picker-trigger,
 .bracket-format-picker.open .bracket-format-trigger,
 .results-custom-select.open .results-custom-select-trigger,
 .p6g-picker-trigger[aria-expanded='true'],
 .aow-select.open .aow-select-trigger,.portal-select.open .portal-select-trigger,
 .ms-ui-select.open .ms-ui-select-trigger,.ms-custom-select.open .ms-custom-select-trigger
){
  border-color:#b3d6c8!important;box-shadow:0 0 0 1px #80bdb7,inset 0 1px 0 #b6dcd1!important;
  background:linear-gradient(180deg,#2c6267,#143a3e)!important;
}
body.aow-masters-theme :is(
 .bracket-team-picker-menu,.bracket-format-menu,.results-custom-select-menu,
 .p6g-picker-menu,.aow-select-menu,.portal-select-menu,.ms-ui-select-menu,
 .ms-custom-select-options
){
  border:1px solid #609899!important;border-radius:2px!important;
  color:#e6f3f0!important;background:linear-gradient(180deg,#10292c,#071719)!important;
  box-shadow:inset 0 1px 0 #42696a,0 15px 38px #000c!important;
  scrollbar-color:#589b9b #061719!important;
}
body.aow-masters-theme :is(
 .bracket-format-trigger strong,.bracket-format-option strong,
 .picker-current strong,.picker-option-text strong,
 .results-custom-select-value,.aow-select-value,
 .p6g-picker-option,.portal-select-option,.aow-select-option,
 .bracket-format-option,.results-custom-select-option
){font-size:18px!important;color:#e8f3ef!important;font-family:var(--aow-heading)!important}
body.aow-masters-theme :is(
 .bracket-format-trigger small,.bracket-format-option small,
 .picker-current small,.picker-option-text small
){font-size:17px!important;color:#a9c4c3!important;letter-spacing:.045em!important}
body.aow-masters-theme :is(
 .picker-option,.results-custom-select-option,.bracket-format-option,
 .p6g-picker-option,.aow-select-option,.portal-select-option,
 .ms-ui-select-option,.ms-custom-select-option
){
  min-height:43px!important;border-radius:1px!important;
  background:transparent!important;color:#e0eeeb!important;
  font-family:var(--aow-heading)!important;
}
body.aow-masters-theme :is(
 .picker-option:hover,.results-custom-select-option:hover,
 .bracket-format-option:hover,.p6g-picker-option:hover,
 .aow-select-option:hover,.portal-select-option:hover,
 .ms-ui-select-option:hover,.ms-custom-select-option:hover
){background:#1e494d!important;color:#fff!important;border-color:#618f90!important}
body.aow-masters-theme :is(
 .picker-option.selected,.results-custom-select-option.selected,
 .bracket-format-option.selected,.p6g-picker-option.is-selected,
 .aow-select-option.selected,.portal-select-option.selected,
 .ms-ui-select-option.selected,.ms-custom-select-option.selected
){
  background:linear-gradient(90deg,#55451b,#2c3020)!important;
  color:#fbe6a3!important;border-color:#b49332!important;
  box-shadow:inset 3px 0 #ebc13c!important;
}
body.aow-masters-theme :is(.picker-check,.format-check,.aow-select-tick,
 .results-custom-select-arrow,.format-chevron,.picker-chevron){color:#94d5d1!important;border-color:#94d5d1!important}
body.aow-masters-theme :is(.picker-option.selected .picker-check,
 .bracket-format-option.selected .format-check,.aow-select-option.selected .aow-select-tick){color:#ffd967!important}
body.aow-masters-theme .picker-search-wrap{background:#091d1f!important}
body.aow-masters-theme .bracket-team-picker .picker-search{
  border:1px solid #639293!important;border-radius:1px!important;
  background:#071719!important;color:#e6f5f0!important;font-size:17px!important;
}
/* Keep faction badges/icons and visible faction text in team pickers. */
body.aow-masters-theme .picker-faction-icon,
body.aow-masters-theme .picker-tbd-icon{border-radius:2px!important}
body.aow-masters-theme .picker-option.confederation:not(.selected):hover{background:#163943!important}
body.aow-masters-theme .picker-option.resistance:not(.selected):hover{background:#372326!important}
/* Audit count was vertically centered while the two controls were bottom-aligned. */
body.aow-masters-theme .p6g-audit .p6g-toolbar{
  display:grid!important;grid-template-columns:minmax(0,1fr) minmax(200px,260px) auto!important;
  align-items:end!important;column-gap:14px!important;row-gap:12px!important;
}
body.aow-masters-theme .p6g-audit :is(.p6g-search-group,.p6g-filter-group){
  flex:none!important;width:100%!important;min-width:0!important;align-self:end!important;
}
body.aow-masters-theme .p6g-audit .p6g-count{
  box-sizing:border-box!important;align-self:end!important;min-height:42px!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
  margin:0!important;border-radius:1px!important;white-space:nowrap!important;
}
body.aow-masters-theme .p6g-audit :is(.p6g-toolbar input,.p6g-picker-trigger){height:42px!important;min-height:42px!important}
/* Bracket width/columns/connectors stay exact. Text and faction rows get game-sized
   typography instead of the old 9–13px website typography. */
body.aow-masters-theme .tournament-bracket .tournament-match{
  padding:10px!important;
}
body.aow-masters-theme .tournament-bracket .tournament-match-head{
  font-size:18px!important;line-height:1.15!important;padding:2px 3px 8px!important;
}
body.aow-masters-theme .tournament-bracket .bo-chip{
  font-size:17px!important;min-height:23px!important;
}
body.aow-masters-theme .tournament-bracket .team-slot{
  min-height:54px!important;padding:7px 9px!important;
  border-radius:1px!important;
}
body.aow-masters-theme .tournament-bracket .team-identity{
  min-width:0!important;font-size:19px!important;letter-spacing:0!important;
  line-height:1.12!important;
}
body.aow-masters-theme .tournament-bracket .team-identity img{
  width:33px!important;height:33px!important;flex-basis:33px!important;
}
body.aow-masters-theme .tournament-bracket .team-score{
  font-size:24px!important;min-width:28px!important;height:32px!important;
}
body.aow-masters-theme .tournament-bracket .match-foot{
  font-size:17px!important;line-height:1.1!important;min-height:28px!important;
}
body.aow-masters-theme .tournament-bracket .match-edit-toggle{
  font-size:17px!important;color:#b4d6d2!important;
}
@media(max-width:760px){
 body.aow-masters-theme .p6g-audit .p6g-toolbar{grid-template-columns:1fr!important}
 body.aow-masters-theme .p6g-audit .p6g-count{justify-self:start!important;min-height:36px!important}
 body.aow-masters-theme #shared-match-editor .match-editor-modal-head strong{font-size:22px!important}
}

/* ================================================================
   V11.3 - Consistent AOW game controls, public map/era legibility.
   CSS only. The edit-match team selector is the visual reference;
   independent picker engines, form values and events are unchanged.
   ================================================================ */

/* Universal AOW selector skin. Include the *actual* dynamic Match Setup
   .ms-custom-select-menu class (older rules targeted a nonexistent class). */
body.aow-masters-theme :is(
  .ms-custom-select-trigger, .results-custom-select-trigger,
  .bracket-team-picker-trigger,.bracket-format-trigger,
  .aow-select-trigger,.portal-select-trigger,.ms-ui-select-trigger,
  .p6g-picker-trigger
){
  box-sizing:border-box!important;
  min-height:46px!important;
  padding:10px 13px!important;
  background:linear-gradient(180deg,#225157 0%,#15383c 49%,#0d292c 50%,#1b4043 100%)!important;
  color:#edf8f4!important;
  border:1px solid #6da8a8!important;
  border-radius:0!important;
  box-shadow:inset 0 1px 0 #83b9b3,inset 0 -2px 0 #07191a!important;
  font-family:var(--aow-heading)!important;
  font-size:19px!important;
  font-weight:700!important;
  line-height:1.15!important;
  text-align:left!important;
  text-shadow:none!important;
}
body.aow-masters-theme :is(
 .ms-custom-select.open .ms-custom-select-trigger,
 .results-custom-select.open .results-custom-select-trigger,
 .bracket-team-picker.open .bracket-team-picker-trigger,
 .bracket-format-picker.open .bracket-format-trigger,
 .aow-select-wrap.open .aow-select-trigger,
 .aow-select.open .aow-select-trigger,
 .portal-select.open .portal-select-trigger,
 .ms-ui-select.open .ms-ui-select-trigger,
 .p6g-picker-trigger[aria-expanded='true']
){
  border-color:#a9d6cd!important;
  background:linear-gradient(180deg,#285c61,#123235)!important;
  box-shadow:0 0 0 1px #80bfb6,inset 0 1px 0 #b8e0d7!important;
}
body.aow-masters-theme :is(
  .ms-custom-select-menu,.results-custom-select-menu,
  .bracket-team-picker-menu,.bracket-format-menu,
  .aow-select-menu,.portal-select-menu,.ms-ui-select-menu,
  .p6g-picker-menu
){
  box-sizing:border-box!important;
  border:1px solid #5c9697!important;
  border-radius:0!important;
  background:linear-gradient(180deg,#10292c,#071719)!important;
  color:#e6f3ee!important;
  padding:5px!important;
  box-shadow:inset 0 1px 0 #446c6a,0 16px 35px #000b!important;
  scrollbar-color:#57999b #061619!important;
  overscroll-behavior:contain;
}
body.aow-masters-theme :is(
  .ms-custom-select-option,.results-custom-select-option,
  .picker-option,.bracket-format-option,.aow-select-option,
  .portal-select-option,.ms-ui-select-option,.p6g-picker-option
){
  box-sizing:border-box!important;
  width:100%;
  min-height:46px!important;
  padding:10px 12px!important;
  border-radius:0!important;
  border:1px solid transparent!important;
  background:transparent!important;
  color:#e5f1eb!important;
  font-family:var(--aow-heading)!important;
  font-size:19px!important;
  font-weight:700!important;
  line-height:1.18!important;
  text-align:left!important;
  text-shadow:none!important;
}
body.aow-masters-theme :is(
  .ms-custom-select-option:hover,.results-custom-select-option:hover,
  .picker-option:hover,.bracket-format-option:hover,.aow-select-option:hover,
  .portal-select-option:hover,.ms-ui-select-option:hover,.p6g-picker-option:hover
){background:#1e484a!important;border-color:#557c7e!important;color:#fff!important}
body.aow-masters-theme :is(
  .ms-custom-select-option.selected,.results-custom-select-option.selected,
  .picker-option.selected,.bracket-format-option.selected,.aow-select-option.selected,
  .portal-select-option.selected,.ms-ui-select-option.selected,.p6g-picker-option.is-selected
){
  background:linear-gradient(90deg,#53441d,#2e3122)!important;
  border-color:#ae8f37!important;
  color:#ffe29a!important;
  box-shadow:inset 4px 0 #ecc13d!important;
}
body.aow-masters-theme :is(.ms-custom-select-check,.picker-check,.format-check,
  .aow-select-tick,.results-custom-select-check){
  color:#f0ca4d!important;
}
body.aow-masters-theme :is(.ms-custom-select-chevron,.results-custom-select-arrow,
  .picker-chevron,.format-chevron){color:#a1dbd5!important;border-color:#a1dbd5!important}
body.aow-masters-theme .ms-custom-select .ms-custom-select-value,
body.aow-masters-theme .results-custom-select .results-custom-select-value{
  color:#eaf6f0!important;font-size:19px!important;line-height:1.15!important;
}
body.aow-masters-theme .ms-custom-select-menu,
body.aow-masters-theme .results-custom-select-menu{
  max-height:min(330px,50dvh)!important;
  overflow-y:auto!important;-webkit-overflow-scrolling:touch;
}
/* The results picker should match the editor, not have its old purple ring. */
body.aow-masters-theme .tournament-results-admin .results-custom-select,
body.aow-masters-theme #shared-match-editor .ms-custom-select{
  border-radius:0!important;
}
body.aow-masters-theme .tournament-results-admin .results-custom-select-trigger,
body.aow-masters-theme #shared-match-editor .ms-custom-select-trigger{
  outline:none!important;
  border:1px solid #71a8a6!important;
}
body.aow-masters-theme .tournament-results-admin .results-custom-select.open .results-custom-select-trigger,
body.aow-masters-theme #shared-match-editor .ms-custom-select.open .ms-custom-select-trigger{
  outline:none!important;box-shadow:0 0 0 1px #9fc9be,inset 0 1px 0 #b0d8cf!important;
}
/* Preserve team insignia and team name + faction secondary text. */
body.aow-masters-theme :is(.picker-option,.bracket-team-picker-trigger){gap:12px!important}
body.aow-masters-theme :is(.picker-faction-icon,.picker-tbd-icon,
  .picker-faction-icon img,.picker-tbd-icon img){
  border-radius:0!important;
}
body.aow-masters-theme .picker-option-text strong,
body.aow-masters-theme .picker-current strong{font-size:19px!important;line-height:1.13!important}
body.aow-masters-theme .picker-option-text small,
body.aow-masters-theme .picker-current small{font-size:18px!important;color:#a8c8c4!important}

/* Map/Era status: tiny 9-11px pills made RUNNING/WAITING unreadable. */
body.aow-masters-theme #shared-match-editor :is(.ms-meta,.ms-sep){
  font-size:16px!important;line-height:1.3!important;color:#d6e8e4!important;
}
body.aow-masters-theme #shared-match-editor :is(.ms-status,.ms-mode,.ms-final-pill,.ms-reason-pill){
  display:inline-flex!important;align-items:center!important;
  min-height:25px!important;padding:4px 9px!important;
  font-size:18px!important;line-height:1.1!important;
  font-weight:800!important;letter-spacing:.035em!important;
  border-radius:0!important;
}
body.aow-masters-theme #shared-match-editor .ms-status-running{
  color:#ffe181!important;background:#3b3116!important;border:1px solid #b9983d!important;
}
body.aow-masters-theme #shared-match-editor .ms-status-finished{
  color:#aaf0bc!important;background:#143b2b!important;border:1px solid #368f65!important;
}
body.aow-masters-theme #shared-match-editor .ms-mode-normal{
  color:#d1e4e1!important;background:#1d3436!important;border:1px solid #567678!important;
}
body.aow-masters-theme #shared-match-editor .ms-mode-decisive{
  color:#ffc1bc!important;background:#452327!important;border:1px solid #b16061!important;
}
body.aow-masters-theme #shared-match-editor .ms-team-name{
  font-size:18px!important;color:#a3dcea!important;
}
body.aow-masters-theme #shared-match-editor :is(.ms-team-name,.ms-final-pill){
  font-weight:800!important;
}
body.aow-masters-theme #shared-match-editor #shared-map-countdown,
body.aow-masters-theme #shared-match-editor #shared-era-countdown{
  color:#ffe38d!important;font-size:21px!important;
  font-weight:900!important;font-family:var(--aow-heading)!important;
  font-variant-numeric:tabular-nums!important;
}
body.aow-masters-theme #shared-match-editor :is(.ms-picker-history-title,.ms-history-row){font-size:16px!important}

/* Player Map/Era HUD: bright badges, large labels and readable times. */
body.aow-masters-theme :is(#match-setup-map-status,#match-setup-era-status){
  color:#e8f5f0!important;font-size:18px!important;line-height:1.4!important;
}
body.aow-masters-theme :is(.picker-meta-pill,.picker-team-pill,.picker-state-pill,
  .picker-decisive-label,.picker-reason-pill,.picker-final-pill,
  .picker-waiting-pill,.match-setup-choice-badge,.match-setup-status-badge){
  border-radius:0!important;min-height:25px!important;padding:4px 9px!important;
  font-family:var(--aow-heading)!important;font-size:18px!important;
  font-weight:800!important;line-height:1.1!important;letter-spacing:.035em!important;
}
body.aow-masters-theme :is(.picker-meta-running,.picker-state-waiting){
  color:#ffe494!important;background:#3b321a!important;border:1px solid #ab904a!important;
}
body.aow-masters-theme :is(.picker-meta-finished,.picker-state-confirmed,.match-setup-choice-badge-confirmed){
  color:#b8f2c5!important;background:#163d30!important;border:1px solid #4b9970!important;
}
body.aow-masters-theme :is(.picker-team-pill,.picker-meta-normal){
  color:#b5e4ed!important;background:#14343d!important;border:1px solid #3c7d8c!important;
}
body.aow-masters-theme :is(#match-setup-map-timer,#match-setup-era-timer){
  border-radius:0!important;min-height:30px!important;padding:5px 10px!important;
  font-size:18px!important;font-weight:700!important;line-height:1.15!important;
  background:#182e30!important;border:1px solid #477c7c!important;color:#e5f2ee!important;
}
body.aow-masters-theme :is(#match-setup-map-timer,#match-setup-era-timer) strong,
body.aow-masters-theme :is(#match-setup-map-timer,#match-setup-era-timer) b{
  color:#ffdc74!important;font-weight:900!important;font-size:21px!important;
}
body.aow-masters-theme :is(.picker-meta-line,.picker-team-state-line){gap:8px!important;line-height:1.4!important}

/* All visible Map/Era image and final-result *frames* are squared like the
   game's UI. No change to how the pictures are cropped or chosen. */
body.aow-masters-theme :is(
  .match-setup-choice-card,.match-setup-final-card,
  .match-setup-choice-media,.match-setup-final-media,
  .match-setup-choice-image,.match-setup-final-image,
  .match-setup-choice-placeholder,.match-setup-choice-description,
  .match-setup-choice-footer,.match-setup-banned-overlay,
  .match-setup-banned-overlay span,.match-setup-final-footer,
  .public-era-game,.public-era-card,
  .ms-option-card,.ms-option-thumb,.ms-selection-map
){border-radius:0!important}
body.aow-masters-theme :is(.match-setup-choice-card,.match-setup-final-card){
  background:#08191c!important;border:1px solid #47696b!important;
  box-shadow:inset 0 1px 0 #385e60!important;
}
body.aow-masters-theme .match-setup-choice-card:not(:disabled):hover{
  transform:none!important;border-color:#8ac6bc!important;
  box-shadow:inset 0 0 0 1px #7aaba6!important;
}
body.aow-masters-theme .match-setup-choice-card.selected{
  border:2px solid #deb94b!important;box-shadow:inset 0 0 0 1px #b59032!important;
}
body.aow-masters-theme .match-setup-choice-card.confirmed{
  border-color:#76c59a!important;box-shadow:inset 0 0 0 1px #38855d!important;
}
body.aow-masters-theme :is(.match-setup-choice-media,.match-setup-final-media,
 .match-setup-choice-placeholder){background:#0b1e20!important}
body.aow-masters-theme .match-setup-choice-description{
  color:#eaf4eb!important;background:#071a1ddf!important;
  border:1px solid #4c797a!important;box-shadow:none!important;
  backdrop-filter:none!important;font-size:18px!important;line-height:1.25!important;
}
body.aow-masters-theme :is(.match-setup-choice-footer,.match-setup-final-footer){
  background:#0a1e20!important;border-top:1px solid #456d6c!important;
  padding:12px!important;
}
body.aow-masters-theme :is(.match-setup-choice-name,.match-setup-final-footer .match-setup-choice-name){
  font-family:var(--aow-heading)!important;font-size:21px!important;
  color:#f0f6ed!important;line-height:1.2!important;
}
body.aow-masters-theme .match-setup-choice-badge-available{
  color:#ffe28a!important;background:#3d341c!important;border:1px solid #a99250!important;
}
body.aow-masters-theme .match-setup-choice-badge-selected{
  color:#ffe49c!important;background:#4b3e1f!important;border:1px solid #c5a03a!important;
}
body.aow-masters-theme .match-setup-choice-badge-banned{
  color:#f0c0ba!important;background:#41262a!important;border:1px solid #a95b5e!important;
}
body.aow-masters-theme .match-setup-banned-overlay span{
  color:#ffe9e3!important;background:#542c2c!important;border:1px solid #b46b6b!important;
  border-radius:0!important;font-size:18px!important;
}
/* Timers/status should not truncate at smaller widths. Dropdowns should fit
   the editor panel without breaking their existing listbox click handling. */
@media(max-width:600px){
 body.aow-masters-theme :is(.ms-custom-select,.results-custom-select){min-width:0!important;max-width:100%!important}
 body.aow-masters-theme :is(.ms-custom-select-trigger,.results-custom-select-trigger){font-size:18px!important}
 body.aow-masters-theme :is(.ms-custom-select-option,.results-custom-select-option,.picker-option){font-size:18px!important}
 body.aow-masters-theme :is(.picker-meta-pill,.picker-team-pill,.picker-state-pill,.ms-status,.ms-mode){font-size:17px!important}
 body.aow-masters-theme .match-setup-choice-description{font-size:17px!important}
}
/* Explicit component selectors outrank earlier :is() groups containing nested
   selectors, whose maximum specificity otherwise left 2px legacy corners. */
body.aow-masters-theme #shared-match-editor .ms-custom-select .ms-custom-select-trigger,
body.aow-masters-theme .tournament-results-admin .results-custom-select .results-custom-select-trigger,
body.aow-masters-theme .bracket-team-picker .bracket-team-picker-trigger,
body.aow-masters-theme .bracket-format-picker .bracket-format-trigger,
body.aow-masters-theme .p6g-category-picker .p6g-picker-trigger,
body.aow-masters-theme .aow-select-wrap .aow-select-trigger,
body.aow-masters-theme .portal-select .portal-select-trigger,
body.aow-masters-theme .ms-ui-select .ms-ui-select-trigger{
 border-radius:0!important;
}
body.aow-masters-theme .results-custom-select .results-custom-select-trigger{border-radius:0!important}
/* Results image panels (both public and admin) also follow the square HUD. */
body.aow-masters-theme :is(
  .public-result-card,.public-result-medal,.public-result-medal img,
  .public-result-medal-fallback,.results-admin-medal-preview,
  .results-admin-medal-preview img,.results-admin-place,
  .results-admin-grid,.results-auto-team-box,.results-override-active,
  .results-placement-number
){border-radius:0!important}
body.aow-masters-theme .tournament-results-admin .results-admin-medal-preview{
  border:1px solid #557f81!important;background:#091d20!important;
}
body.aow-masters-theme .public-result-card{
  border-color:#517b7d!important;box-shadow:inset 0 1px 0 #456b69,0 5px 15px #0008!important;
}

/* ================================================================
   V11.6 — Chat legibility, single utility glyphs, adaptive Read By
   Both chat systems use exactly one rendered icon per utility button.
   The receipt popover is repositioned by aow_readby_adaptive.js.
   ================================================================ */
body.aow-masters-theme :is(.tournament-chat-compose .tournament-chat-attach,
  .tournament-chat-compose .chat-emoji-button,
  .match-chat-compose .match-chat-attach-button,
  .match-chat-compose .chat-emoji-button){
  font-family:"Segoe UI Emoji","Apple Color Emoji",sans-serif!important;
  font-size:22px!important;line-height:1!important;
  text-align:center!important;letter-spacing:0!important;
  overflow:visible!important;
  border-radius:0!important;
}
/* The HTML buttons already contain their icon. Legacy CSS also added one. */
body.aow-masters-theme :is(.tournament-chat-attach,.match-chat-attach-button,.chat-emoji-button)::before,
body.aow-masters-theme :is(.tournament-chat-attach,.match-chat-attach-button,.chat-emoji-button)::after{
  display:none!important;content:none!important;
}

/* Do not use the extremely condensed HUD display face for chat paragraphs. */
body.aow-masters-theme :is(.tournament-chat-text,.match-chat-text,
 .chat-reply-quote-text,.chat-message-deleted-text){
  font-family:system-ui,-apple-system,"Segoe UI",Arial,sans-serif!important;
  color:#f1f5f1!important;font-size:16px!important;line-height:1.52!important;
  letter-spacing:0!important;font-weight:450!important;
  overflow-wrap:anywhere!important;white-space:normal;
}
body.aow-masters-theme :is(.tournament-chat-bubble,.match-chat-bubble){
  background:#13292c!important;border:1px solid #557b7c!important;
  border-radius:0!important;padding:14px 16px!important;
  min-width:0!important;max-width:min(83%,640px)!important;
  box-shadow:none!important;
}
body.aow-masters-theme :is(.tournament-chat-row.staff .tournament-chat-bubble,
 .match-chat-row.staff .match-chat-bubble){
  background:#2d2a1f!important;border-color:#ad904c!important;
  box-shadow:inset 4px 0 0 #d9b951!important;
}
body.aow-masters-theme :is(.tournament-chat-row.confederation:not(.mine) .tournament-chat-bubble,
 .match-chat-row.confederation:not(.mine) .match-chat-bubble){
  background:#152f3b!important;border-color:#397993!important;
}
body.aow-masters-theme :is(.tournament-chat-row.resistance:not(.mine) .tournament-chat-bubble,
 .match-chat-row.resistance:not(.mine) .match-chat-bubble){
  background:#34252a!important;border-color:#95575b!important;
}
body.aow-masters-theme :is(.tournament-chat-meta,.match-chat-meta){
  gap:8px!important;flex-wrap:wrap!important;margin-bottom:10px!important;
}
body.aow-masters-theme :is(.tournament-chat-meta strong,.match-chat-meta strong,
 .chat-sender-team,.match-chat-team-sender){
  font-size:18px!important;line-height:1.2!important;font-weight:800!important;
  color:#f7e0a0!important;letter-spacing:.015em!important;
}
body.aow-masters-theme :is(.tournament-chat-meta>span,.match-chat-meta>span){
  font-family:var(--aow-body)!important;font-size:16px!important;
  color:#c7cfcb!important;letter-spacing:.03em!important;
}
body.aow-masters-theme :is(.tournament-chat-bubble time,.match-chat-bubble time,
 .chat-message-time time){
  color:#b4c4c4!important;font-family:system-ui,-apple-system,"Segoe UI",sans-serif!important;
  font-size:16px!important;line-height:1.4!important;letter-spacing:0!important;
}
body.aow-masters-theme :is(.chat-message-action,.chat-message-edited){
  font-size:17px!important;line-height:1.15!important;
  color:#cee9e7!important;letter-spacing:.025em!important;
}
body.aow-masters-theme :is(.chat-reply-quote,.chat-reply-preview){
  border-radius:0!important;
  background:#213834!important;border-color:#847443!important;
}
body.aow-masters-theme :is(.chat-reply-quote-label,.chat-reply-preview-label){
  color:#f0d57b!important;font-size:16px!important;
}
/* Make the Read By counter and expanded names legible, without changing the
   existing seen-by payload, receipt registration, or chat permissions. */
body.aow-masters-theme .chat-seen-receipts{position:relative!important;z-index:4}
body.aow-masters-theme .chat-seen-receipts[open]{z-index:110!important}
body.aow-masters-theme .chat-seen-receipts>summary{
  font-size:17px!important;line-height:1.1!important;
  color:#dbeef0!important;background:#173337!important;
  border:1px solid #598a90!important;border-radius:0!important;
  padding:5px 9px!important;min-height:28px!important;
}
body.aow-masters-theme .chat-seen-receipts>summary span{
  color:#9cdee1!important;font-weight:900!important;
}
body.aow-masters-theme .chat-seen-receipts[open] .chat-seen-panel{
  position:absolute!important;left:var(--readby-shift-x,0px)!important;right:auto!important;
  top:calc(100% + 7px)!important;bottom:auto!important;
  z-index:120!important;box-sizing:border-box!important;
  min-width:215px!important;width:max-content!important;max-width:min(315px,calc(100vw - 20px))!important;
  border:1px solid #73a8aa!important;border-radius:0!important;
  background:#0c2228!important;color:#e9f4f4!important;
  box-shadow:0 12px 30px #000c!important;
  padding:12px 14px!important;overflow-y:auto!important;
}
body.aow-masters-theme .chat-seen-receipts[open][data-popup-direction="up"] .chat-seen-panel{
  top:auto!important;bottom:calc(100% + 7px)!important;
}
body.aow-masters-theme .chat-seen-panel>strong{
  font-size:17px!important;color:#91d4d7!important;
  margin-bottom:8px!important;
}
body.aow-masters-theme .chat-seen-person{
  padding:8px 0!important;border-top:1px solid #315356!important;
  font-family:system-ui,-apple-system,"Segoe UI",sans-serif!important;
  font-size:16px!important;line-height:1.35!important;
}
body.aow-masters-theme .chat-seen-person span{color:#f2f4f2!important;font-weight:650!important}
body.aow-masters-theme .chat-seen-person time{font-size:16px!important;color:#b5c9cc!important}
@media(max-width:600px){
  body.aow-masters-theme :is(.tournament-chat-bubble,.match-chat-bubble){
    max-width:min(95%,640px)!important;padding:12px 13px!important;
  }
  body.aow-masters-theme :is(.tournament-chat-text,.match-chat-text,.chat-reply-quote-text){
    font-size:16px!important;line-height:1.54!important;
  }
  body.aow-masters-theme :is(.tournament-chat-compose .tournament-chat-attach,
    .tournament-chat-compose .chat-emoji-button,
    .match-chat-compose .match-chat-attach-button,
    .match-chat-compose .chat-emoji-button){
    font-size:21px!important;min-width:36px!important;
  }
}

/* V11.7 — viewport anchored chat receipt overlay. The panel is temporarily
   relocated to body while open; it cannot be clipped by message scrollports. */
body.aow-masters-theme .chat-seen-panel.aow-readby-float,
.chat-seen-panel.aow-readby-float{
  position:fixed!important;display:block!important;z-index:9500!important;
  bottom:auto!important;right:auto!important;
  min-width:215px!important;max-width:calc(100vw - 20px)!important;
  background:#0b2327!important;color:#edf7f4!important;
  border:1px solid #6eaab0!important;border-radius:0!important;
  box-shadow:0 12px 32px rgba(0,0,0,.82)!important;
  overflow-y:auto!important;overflow-x:hidden!important;
  box-sizing:border-box!important;padding:12px 14px!important;
}
body.aow-masters-theme .chat-seen-panel.aow-readby-float>strong{display:block;color:#a3dbd8!important;font-size:17px!important;margin:0 0 8px!important}
body.aow-masters-theme .chat-seen-panel.aow-readby-float .chat-seen-person{font-family:system-ui,-apple-system,'Segoe UI',sans-serif!important;font-size:16px!important;line-height:1.35!important}
/* SVG instead of OS-dependent emoji glyphs, so desktop and Android match. */
body.aow-masters-theme .aow-chat-utility-icon{
  display:block;width:22px;height:22px;fill:none;stroke:#9fdee4;stroke-width:1.9;
  stroke-linecap:round;stroke-linejoin:round;pointer-events:none;flex:none;
}
body.aow-masters-theme :is(.tournament-chat-attach,.match-chat-attach-button,.chat-emoji-button):has(.aow-chat-utility-icon){
  display:inline-flex!important;justify-content:center!important;align-items:center!important;
  font-size:0!important;line-height:1!important;
}
body.aow-masters-theme :is(.tournament-chat-attach,.match-chat-attach-button,.chat-emoji-button):has(.aow-chat-utility-icon)::before,
body.aow-masters-theme :is(.tournament-chat-attach,.match-chat-attach-button,.chat-emoji-button):has(.aow-chat-utility-icon)::after{content:none!important;display:none!important}
@media(max-width:600px){body.aow-masters-theme .aow-chat-utility-icon{width:24px;height:24px}}

/* V11.7 — wide-monitor homepage. Other page layouts and bracket geometry are untouched. */
@media(min-width:1024px){
  body.aow-masters-theme.aow-home-view:not(.tournament-chat-view)>.wrap{
    width:min(1600px,calc(100% - 80px))!important;
    max-width:1600px!important;
  }
  body.aow-masters-theme.aow-home-view .nav{padding:22px 28px!important}
  body.aow-masters-theme.aow-home-view .hero{
    min-height:clamp(460px,49vh,700px)!important;
    padding:clamp(68px,7vw,120px) 42px!important;
    display:flex!important;justify-content:center!important;
  }
  body.aow-masters-theme.aow-home-view .hero h1{
    font-size:clamp(62px,5.25vw,103px)!important;
    max-width:1320px!important;white-space:normal!important;
    overflow-wrap:anywhere!important;
  }
  body.aow-masters-theme.aow-home-view .hero p{
    font-size:clamp(18px,1.3vw,23px)!important;max-width:1020px!important;
  }
  body.aow-masters-theme.aow-home-view .hero .btn{font-size:18px!important;padding:14px 22px!important}
  body.aow-masters-theme.aow-home-view>.wrap>.grid{gap:22px!important}
  body.aow-masters-theme.aow-home-view>.wrap>.grid>.card{
    min-height:170px!important;padding:28px!important;
  }
  body.aow-masters-theme.aow-home-view>.wrap>.grid .metric{
    font-size:clamp(30px,2.6vw,48px)!important;line-height:1.15!important;
  }
  body.aow-masters-theme.aow-home-view>.wrap>.grid .metric[style]{
    font-size:clamp(25px,2.25vw,39px)!important;
  }
  body.aow-masters-theme.aow-home-view .schedule-card{min-height:105px!important}
}


/* V11.8 — shared game-style chat action buttons; same geometry in both chats.
   Leave chat authorization and click handlers attached to the original IDs. */
body.aow-masters-theme .aow-chat-header-button {
  appearance:none!important; -webkit-appearance:none!important;
  display:inline-flex!important; align-items:center!important; justify-content:center!important;
  box-sizing:border-box!important; min-height:42px!important;
  padding:10px 17px!important; border-radius:3px!important;
  font-family:inherit!important; font-size:18px!important; font-weight:800!important;
  letter-spacing:.065em!important; line-height:1.15!important;
  text-align:center!important; white-space:nowrap!important; cursor:pointer;
  transition:background .14s ease,border-color .14s ease,box-shadow .14s ease;
}
body.aow-masters-theme .aow-chat-header-button--participants {
  color:#e0c8ff!important; background:#241c34!important;
  border:1px solid #9d76c6!important;
  box-shadow:inset 3px 0 #ac8cd1;
}
body.aow-masters-theme .aow-chat-header-button--participants:hover,
body.aow-masters-theme .aow-chat-header-button--participants[aria-expanded="true"] {
  color:#fff!important; background:#342446!important; border-color:#c3a1f1!important;
}
body.aow-masters-theme .aow-chat-header-button--danger {
  color:#ffa3aa!important; background:#291a22!important;
  border:1px solid #b65368!important; box-shadow:inset 3px 0 #dc6877;
}
body.aow-masters-theme .aow-chat-header-button--danger:hover {
  color:#ffe1e3!important; background:#49232e!important; border-color:#fa8b96!important;
}
body.aow-masters-theme .aow-chat-header-button:focus-visible {
  outline:2px solid #a1edf0!important; outline-offset:3px;
}
body.aow-masters-theme .aow-chat-header-button:disabled {
  opacity:.45!important; cursor:not-allowed;
}
/* The existing Match Chat modal remains in its own scroll container.
   Wrap only its header on narrow displays, never the bracket itself. */
@media(max-width:600px){
  body.aow-masters-theme .aow-chat-header-button {
    min-height:44px!important; padding:10px 13px!important; font-size:17px!important;
  }
  body.aow-masters-theme .match-chat-header{flex-wrap:wrap!important;gap:12px!important;}
  body.aow-masters-theme .match-chat-header>div:first-child{flex:1 1 100%;min-width:0;}
  body.aow-masters-theme .match-chat-header-actions{
    width:100%;justify-content:flex-end;gap:10px!important;
  }
  body.aow-masters-theme .tournament-chat-notice-actions{gap:10px!important;}
}


/* V11.9 — final-message Read By CSS fallback. If a stale script does not
   move the panel into the viewport, don't let the legacy "open down" rule
   hide the last message's receipt under the compose bar. */
body.aow-masters-theme :is(#tournament-chat-messages,#match-chat-messages) > :is(.tournament-chat-row,.match-chat-row):last-child .chat-seen-receipts[open] .chat-seen-panel{
  top:auto!important;bottom:calc(100% + 9px)!important;
}
/* The viewport overlay is positioned by aow_readby_adaptive.js (not CSS). */
body.aow-masters-theme .chat-seen-panel.aow-readby-float{
  top:0;bottom:auto!important;position:fixed!important;z-index:9500!important;
}

/* Tournament access banner: readable AOW tactical information strip. */
body.aow-masters-theme .tournament-chat-notice{
  background:linear-gradient(110deg,#192b2c,#102326 68%,#0d1a21)!important;
  border-bottom:1px solid #517578!important;
  padding:13px 18px!important;
  gap:12px!important;
}
body.aow-masters-theme .tournament-chat-notice>span:first-child{
  font-size:22px!important;color:#bd95f2!important;
  text-shadow:0 0 9px #9660cb66;line-height:1.2!important;
}
body.aow-masters-theme .tournament-chat-notice-text{
  font-family:var(--aow-body)!important;
  font-size:16px!important;font-weight:600!important;
  color:#e3f1ed!important;line-height:1.45!important;
  letter-spacing:.012em!important;
}
@media(max-width:600px){
  body.aow-masters-theme .tournament-chat-notice{padding:14px 13px!important;gap:10px!important}
  body.aow-masters-theme .tournament-chat-notice-text{font-size:18px!important;line-height:1.45!important}
}
/* Chat confirmation uses the existing all-portal game modal: keep destructive
   CTAs unmistakable without reverting to the legacy small purple popup. */
body.aow-masters-theme #portal-confirm .portal-modal-card{
  width:min(540px,calc(100vw - 28px));padding:clamp(20px,4vw,30px)!important;
}
body.aow-masters-theme #portal-confirm #portal-confirm-message{
  font-size:17px!important;line-height:1.5!important;color:#d4e4e0!important;
}
body.aow-masters-theme #portal-confirm .portal-modal-actions .btn{
  min-height:44px!important;font-size:17px!important;padding:9px 20px!important;
}

body.aow-masters-theme #portal-confirm #portal-confirm-ok.danger-action{
  background:linear-gradient(180deg,#9c3b47,#69232d)!important;
  border-color:#e17880!important;color:#fff!important;
}
body.aow-masters-theme #portal-confirm #portal-confirm-ok.danger-action:hover{
  background:linear-gradient(180deg,#b44c54,#7e2c35)!important;
}

/* Match Chat itself uses z-index:10050: the shared confirmation must appear
   ABOVE it, just as the removed legacy chat dialog used to. */
body.aow-masters-theme #portal-confirm.portal-modal{
  z-index:2000100!important;
}
