/* CLOSE THE MATCH — shared presentation system v549.
   Activity/gender/seat/status palettes and all semantic custom properties are deliberately untouched. */
:root{
 --ui-ink:#193e58;--ui-muted:#526b7c;--ui-action:#245980;--ui-soft:#eaf3f8;--ui-canvas:#f3f6f8;--ui-border:#bdcedb;
 --ui-font: 'DM Sans',Arial,sans-serif;--ui-heading:Manrope,Arial,sans-serif;
 --ui-text:16px;--ui-label:16px;--ui-meta:14px;--ui-page:34px;--ui-section:23px;--ui-card:19px;
 --ui-r-control:11px;--ui-r-card:16px;--ui-r-dialog:20px;
 --ui-gap:16px;--ui-pad:20px;--ui-shadow:0 3px 12px #193e5810;--ui-modal-shadow:0 20px 65px #102c4540;
 --ctm-form-label:16px;--ctm-form-help:14px;--ctm-form-section:20px;--ctm-form-category:18px;--ctm-form-subcategory:16px;--ctm-form-gap:16px;
}
body{font-family:var(--ui-font);font-size:var(--ui-text);background:var(--ui-canvas)}
body :is(main,dialog) :is(h1,h2,h3,h4){font-family:var(--ui-heading);line-height:1.3;overflow-wrap:break-word}
body main h1,body #main h1,body .activity-view-heading h1{font-size:var(--ui-page)!important;letter-spacing:-.65px;font-weight:800!important}
body :is(main,dialog) h2{font-size:var(--ui-section)}
body :is(main,dialog) h3{font-size:var(--ui-card)}
body :is(main,dialog) :is(p,.muted,.subtle,.note){line-height:1.55}
body :is(main,dialog) :is(.muted,.subtle,.note){font-size:var(--ui-meta)}
body :is(main,dialog) :is(.panel,.card,.review-item,.center-office-package,.participation-folder,.workflow-calendar,.workflow-history,.player-activity-archive){border-radius:var(--ui-r-card);min-width:0;box-sizing:border-box}
body :is(main,dialog) :is(.panel,.card,.review-item){box-shadow:var(--ui-shadow)}
body :is(main,dialog) :is(.heading,.info-title){gap:var(--ui-gap)}
body :is(main,dialog) :is(.row-actions,.form-actions,.center-profile-footer,.friend-actions){gap:10px;flex-wrap:wrap;align-items:center}
body :is(main,dialog) button:is(.primary,.outline,.text-button),body :is(main,dialog) .row-actions>button{min-height:44px;font-size:15px;line-height:1.35;border-radius:var(--ui-r-control);white-space:normal;overflow-wrap:break-word;padding:10px 16px}
body :is(main,dialog) button:focus-visible,body :is(main,dialog) :is(input,select,textarea):focus-visible{outline:3px solid #2998bd;outline-offset:3px}
body :is(main,dialog) form :is(.field,.address-editor-field){font-size:var(--ui-label)!important;line-height:1.5;min-width:0}
body :is(main,dialog) form :is(.field,.address-editor-field)>:is(input,select,textarea):not([type=checkbox]):not([type=radio]):not([type=hidden]):not(.ctm-time-input){font-family:var(--ui-font);font-size:16px!important;border-radius:var(--ui-r-control);min-height:48px;max-width:100%;min-width:0}
body :is(main,dialog) form :is(.field small,.subtle,.address-editor-help){font-size:var(--ui-meta)!important;line-height:1.5}
body :is(main,dialog) form .confirmation-check{font-size:15px!important;gap:10px;line-height:1.5}
body :is(main,dialog) form .confirmation-check input{flex-shrink:0}
body :is(main,dialog) :is(.form-grid,.office-identity-data,.center-service-unit-list){gap:var(--ui-gap)}
body :is(main,dialog) :is(.field,.form-grid,.row-actions,.request-details)>*{min-width:0}
body :is(main,dialog) [hidden]{display:none!important}
/* Profile and settings surfaces: no changes to colored level badges or availability states. */
body .identity-document-intro h1{font-size:28px;line-height:1.25}
body :is(.identity-document-body,.office-package-body,.settings-package-body){line-height:1.5}
body :is(.identity-document-section-title,.office-package-body h3,.settings-package-body h3){font-weight:750}
body .center-office-package>summary{font-size:18px;line-height:1.4;min-height:68px;padding:16px;gap:12px}
body .office-identity-data dt{font-size:14px;line-height:1.4}
body .office-identity-data dd{font-size:16px;line-height:1.5;overflow-wrap:anywhere}
body .office-package-body{padding:0 16px 20px}
body :is(.identity-document-section,.center-office-package,.home-focus-cards>*){border-radius:var(--ui-r-card)}
body .home-focus-cards{gap:20px}
body .home-focus .home-habitual-tile{border-radius:var(--ui-r-card)}
body .home-focus :is(.home-tile-schedule>b,.home-tile-tournaments>b,.home-tile-tournaments>small,.home-tile-zone>b,.home-tile-zone>small){font-size:14px}
body .home-focus .home-tile-state{font-size:12px}
body .center-profile-footer{padding:16px;gap:12px}
/* Activity facts and controls: shape/type only. Their existing colors remain authoritative. */
body :is(.player-day-card,.center-compact-card,.activity-clarified,.dashboard-chat-item){border-radius:var(--ui-r-card)}
body :is(.player-day-group,.center-activity-group)>summary{min-height:56px;padding:14px 16px;line-height:1.4}
body :is(.player-day-group,.center-activity-group)>summary strong{font-size:18px}
body :is(.summary-facts dt,.summary-seat-hint,.summary-venue,.request-details,.registered-level-note){font-size:14px;line-height:1.5}
body .summary-facts dd{font-size:16px;line-height:1.45}
body :is(.activity-quicklook,.center-compact-management,.center-compact-extra,.summary-confirmed-details){border-radius:12px}
body :is(.center-compact-management,.center-compact-extra)>summary{font-size:16px;line-height:1.45;padding:13px}
body :is(.event-personal-choice,.summary-event-guests,.confirm-request-form){border-radius:var(--ui-r-card)}
body .summary-participation-actions{gap:12px}
body .summary-participation-actions>button{min-height:48px;font-size:16px}
/* Calendar, archive and tracking: keep data density, make supplementary facts readable. */
body :is(.activity-calendar-legend,.activity-calendar-demo-note,.tracking-intro,.tracking-source-note,.tracking-period,.tracking-controls .field){font-size:14px;line-height:1.5}
body .tracking-kpis{gap:12px}
body .tracking-kpis>div{border-radius:12px;padding:14px;min-width:0}
body .tracking-kpis span{font-size:14px;line-height:1.4}
body .tracking-kpis strong{font-size:28px}
body .tracking-table-scroll{border-radius:12px;max-width:100%;overscroll-behavior:contain}
body .tracking-table{font-size:14px}
body .center-history-table{font-size:14px}
body :is(.workflow-calendar,.workflow-history,.player-activity-archive)>summary{font-size:17px;line-height:1.4;padding:16px}
body :is(.activity-calendar-heading,.calendar-heading)>button{min-width:40px;min-height:44px;font-size:26px}
/* Notifications use the same font; state/priority colors are preserved. */
body .ctm-mailbox{font-family:var(--ui-font);border-radius:var(--ui-r-card)}
body :is(.mail-preview,.mail-thread-phase,.mail-thread-history p,.ctm-mail-sender,.mail-row-top time){font-size:14px;line-height:1.5}
body :is(.mail-detail h3,.workflow-notice-group h3,.friend-notice>strong){font-size:19px;line-height:1.4}
body :is(.mail-toolbar,.mail-filter-bar){gap:8px;flex-wrap:wrap}
body :is(.ctm-mail-content,.mail-detail,.mail-letter){min-width:0;overflow-wrap:anywhere}
/* Dialogs retain their individual behavior and content. */
body dialog:not(.ctm-time-wheel-dialog):not(.ctm-tutorial-dialog){border-radius:var(--ui-r-dialog);box-shadow:var(--ui-modal-shadow);max-width:calc(100vw - 24px);max-height:calc(100dvh - 24px)}
body dialog:not(.ctm-time-wheel-dialog)::backdrop{background:#102c4599}
body :is(.friends-heading,.center-chat-search-dialog>header,.activity-summary-header,.direction-chat-dialog>header){gap:12px;min-width:0;box-sizing:border-box}
body :is(.friends-heading,.center-chat-search-dialog>header,.activity-summary-header,.direction-chat-dialog>header) h2{font-size:22px;line-height:1.3;min-width:0;overflow-wrap:anywhere}
body :is(.center-chat-result,.friend-person){gap:12px;min-width:0;padding:16px}
body .center-chat-result>div{min-width:0;overflow-wrap:anywhere}
body .center-chat-result strong{font-size:18px;line-height:1.4}
body .center-chat-result p{font-size:14px;line-height:1.5}
body .ctm-back-chevron{width:22px!important;height:26px!important}
/* Chat destinations: one card geometry, existing category colors and official logo. */
body .chat-category-grid{gap:16px}
body button.chat-category-card{border-radius:var(--ui-r-card);box-shadow:var(--ui-shadow);padding:20px;min-height:132px}
body .chat-category-copy{gap:7px}
body .chat-category-copy strong{font-size:21px;line-height:1.3}
body .chat-category-copy>span{font-size:16px;line-height:1.45}
body .chat-category-copy small{font-size:14px;line-height:1.4}
body .chat-category-heading{padding:16px;border-radius:var(--ui-r-card)}
body .chat-category-heading h2{font-size:23px}
body .dashboard-thread-copy{gap:7px}
body .dashboard-thread-copy strong{font-size:18px;line-height:1.4}
body .dashboard-thread-preview{font-size:15px;line-height:1.5}
body .dashboard-thread-center{font-size:15px}
body .dashboard-thread-row{min-height:80px}
/* Friend chat: single scrolling body, composer always available. */
body dialog.friends-dialog[open]{display:flex;flex-direction:column;max-height:calc(100dvh - 24px);overflow:hidden;padding:0}
body .friends-heading{position:static;flex:0 0 auto;height:auto;min-height:72px;padding:16px}
body .friends-heading h2{font-size:21px}
body .friends-tabs{flex:0 0 auto;gap:8px;padding:8px}
body .friends-tabs button{font-size:15px;min-height:44px;border-radius:var(--ui-r-control)}
body .friends-body{min-height:0;overflow:auto;padding:20px;overscroll-behavior:contain}
body .friends-body:has(.friend-composer){display:flex;flex-direction:column;overflow:hidden;flex:1 1 auto}
body .friends-body:has(.friend-composer)>.friend-members{flex:0 0 auto;max-height:25dvh;overflow:auto;margin:0 0 12px}
body .friends-body:has(.friend-composer)>.friend-actions{flex:0 0 auto;margin:0 0 12px}
body .friend-messages{flex:1 1 auto;min-height:120px;max-height:50dvh;overflow:auto;gap:12px;padding:16px;border-radius:12px;overscroll-behavior:contain}
body .friend-chat-row{border-radius:var(--ui-r-card);padding:16px;gap:8px;box-shadow:var(--ui-shadow)}
body .friend-chat-row strong{font-size:18px;line-height:1.4;flex-wrap:wrap;overflow-wrap:anywhere}
body .friend-chat-row small{font-size:14px;line-height:1.4}
body .friend-chat-row>span{font-size:15px;line-height:1.5}
body .friend-message{padding:12px 14px;border-radius:15px;max-width:88%;box-shadow:var(--ui-shadow);min-width:0}
body .friend-message p{font-size:16px;line-height:1.5;margin:6px 0;overflow-wrap:anywhere}
body .friend-message strong{font-size:14px;line-height:1.4}
body .friend-message time{font-size:14px;line-height:1.4}
body .friend-composer{flex:0 0 auto;gap:10px;align-items:flex-end;padding:14px 0 max(0px,env(safe-area-inset-bottom));margin:0;background:inherit}
body .friend-composer .field{min-width:0;flex:1}
body .friend-composer .field textarea{min-height:48px!important;max-height:120px;resize:vertical;border-radius:12px}
body .friend-composer button{min-height:48px;font-size:16px;flex:0 0 auto}
body .friend-checkbox{font-size:16px;min-height:48px;gap:12px}
/* Center/activity chat dimensions only: --chat-* colors remain untouched. */
body .live-chat-heading .event-chat-header-copy>strong{font-size:19px!important;line-height:1.35}
body .live-chat-heading .event-chat-header-copy>small{font-size:14px!important;line-height:1.4}
body .center-chat-subtitle{font-size:15px;line-height:1.4}
body .live-chat-heading{min-height:72px;padding:14px!important;gap:12px}
body .live-chat-toolbar{flex-wrap:wrap}
body .live-chat-toolbar button{min-height:44px!important;font-size:14px;padding:10px 12px!important}
body .event-chat-thread.message-bubble-thread .chat-message{border-radius:15px;padding:12px 14px;max-width:88%;min-width:0}
body .event-chat-thread.message-bubble-thread .chat-message p{font-size:16px!important;line-height:1.5;overflow-wrap:anywhere}
body .event-chat-thread.message-bubble-thread .chat-message :is(strong,small){font-size:14px!important;line-height:1.4}
body .live-chat-composer{gap:10px;padding:10px!important;align-items:flex-end}
body .live-chat-input{min-width:0}
body .live-chat-input textarea{min-height:48px!important;height:48px;max-height:120px;padding:11px 13px!important;border-radius:14px!important;font-size:16px!important;line-height:1.5!important}
body .live-chat-send{width:48px!important;height:48px!important;min-height:48px!important;flex:0 0 48px!important;padding:12px!important}
body .live-chat-send svg{width:24px;height:24px}
body .live-chat-back{min-width:44px;min-height:44px}
body .event-conversation-copy :is(b,strong){font-size:17px;line-height:1.4}
body .event-conversation-copy :is(small,span){font-size:14px;line-height:1.5}
/* Official support: same spacing/typography, separate branding retained. */
body .ctm-support-dialog{padding:20px}
body .ctm-support-dialog>header{display:grid!important;grid-template-columns:minmax(0,1fr) 44px;align-items:center;min-height:0!important;height:auto!important;border-radius:14px;gap:12px;padding:16px!important}
body .ctm-support-dialog>header h2{width:auto!important;margin:0;min-width:0}
body .ctm-support-dialog>header h2{font-size:23px}
body .ctm-support-intro{padding:20px 0;gap:16px}
body .ctm-support-intro strong{font-size:20px;line-height:1.4}
body .ctm-support-intro p{font-size:16px;line-height:1.5}
body .ctm-support-dialog .mail-compose{gap:16px}
body .ctm-support-dialog :is(input,textarea){max-width:100%;font-size:16px;border-radius:var(--ui-r-control)}
body .ctm-support-dialog .mail-letter{padding:16px;border-radius:var(--ui-r-card);font-size:16px;line-height:1.5;overflow-wrap:anywhere}
body .ctm-support-dialog :is(time,small){font-size:14px}
@media(max-width:760px){
 :root{--ui-page:29px;--ui-section:21px;--ui-card:18px;--ui-pad:16px;--ui-gap:14px}
 body main{padding-left:12px;padding-right:12px}
 body .center-office-package>summary{font-size:17px;padding:14px 12px;gap:10px}
 body .office-package-body{padding:0 12px 16px}
 body .center-history-table{font-size:13px}
 body .center-history-table th:first-child{font-size:12px}
 body .tracking-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}
 body .tracking-controls{grid-template-columns:minmax(0,1fr)}
 body .tracking-kpis strong{font-size:26px}
 body .center-chat-result{flex-wrap:wrap;padding:14px}
 body .center-chat-result>button{min-height:44px}
 body .friends-body{padding:14px}
 body .friends-heading{padding:14px 12px;gap:10px;min-height:64px}
 body .friends-heading h2{font-size:20px}
 body .friend-message,body .event-chat-thread.message-bubble-thread .chat-message{max-width:94%}
 body .friend-messages{padding:12px;max-height:none}
 body .friend-composer{gap:8px}
 body button.chat-category-card{padding:16px 14px;min-height:124px}
 body .chat-category-copy strong{font-size:20px}
 body .chat-category-copy>span{font-size:15px}
 body.ctm-mobile-conversation .live-chat-composer{padding:10px 10px calc(10px + env(safe-area-inset-bottom))!important}
 body .live-chat-heading .event-chat-header-copy>strong{font-size:18px!important}
 body .ctm-support-dialog{padding:14px}
 body .ctm-support-intro{gap:12px}
 body .ctm-support-intro strong{font-size:19px}
 body .activity-summary-dialog .summary-facts{grid-template-columns:minmax(0,1fr);gap:12px}
 body .activity-summary-dialog .summary-facts dd{font-size:16px}
 body .activity-summary-dialog .summary-event-guests{padding:12px}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}body .home-focus #player-document-preferences{animation:none}}
/* Event guests: independent flow for the two decisions and one card per guest. */
body .activity-summary-dialog .summary-event-guests{display:flex;flex-direction:column;gap:16px;box-sizing:border-box;width:100%;min-width:0;margin:24px 0 0;padding:16px}
body .activity-summary-dialog .summary-event-guests>p,body .activity-summary-dialog .summary-event-guests>h3{margin:0!important}
body .activity-summary-dialog .event-guests-later{display:block;width:100%;height:auto;min-height:48px;white-space:normal;line-height:1.5;position:static;flex:none;margin:0!important}
body .activity-summary-dialog .event-guest-disclosure{display:block;position:static;isolation:isolate;margin:0!important;padding:0;min-width:0;width:100%;border:0}
body .activity-summary-dialog .event-guest-disclosure>summary{display:block!important;position:static!important;inset:auto!important;height:auto!important;min-height:52px;box-sizing:border-box;width:100%;margin:0!important;padding:14px!important;line-height:1.5!important;white-space:normal;box-shadow:none!important}
body .activity-summary-dialog .event-guest-disclosure>summary::after{content:none!important}
body .activity-summary-dialog .event-guest-disclosure>form{position:static!important;display:flex;flex-direction:column;gap:16px;margin:0!important;padding:18px 0 0!important;min-width:0;box-sizing:border-box;width:100%}
body .activity-summary-dialog .event-guest-count-label{display:flex!important;flex-direction:column;align-items:stretch;gap:10px!important;margin:0!important}
body .activity-summary-dialog .event-guest-person{box-sizing:border-box;min-inline-size:0;max-width:100%;width:100%}
body .activity-summary-dialog .event-guest-outcomes:empty{display:none}
body .center-event-guests{display:grid;gap:14px;grid-column:1/-1;clear:both;width:100%;min-width:0;box-sizing:border-box;margin:22px 0 0;padding:16px;border:1px solid var(--ui-border);border-radius:16px;background:var(--ui-soft)}
body .center-event-guests>:is(h3,h4){font-size:20px!important;line-height:1.4;margin:0!important}
body .event-guest-entry{display:flex!important;flex-direction:column;align-items:stretch;gap:10px;padding:16px!important;margin:0!important;border:1px solid var(--ui-border);border-radius:12px;background:#fff;min-width:0;box-sizing:border-box;width:100%;overflow-wrap:anywhere}
body .event-guest-entry>strong{display:block;font-size:18px;line-height:1.4}
body .event-guest-entry>p{font-size:15px!important;line-height:1.6;margin:0!important}
body .event-guest-actions{display:flex;flex-wrap:wrap;gap:10px;padding-top:4px;min-width:0}
body .event-guest-actions>button{flex:1 1 180px;min-height:48px;height:auto;line-height:1.45;font-size:16px;white-space:normal;margin:0!important;padding:12px!important}
@media(max-width:600px){
 body .activity-summary-dialog .activity-summary-body{padding:14px 12px!important}
 body .activity-summary-dialog .summary-event-guests,body .center-event-guests{padding:12px}
 body .activity-summary-dialog .event-guest-person{padding:14px 10px!important}
 body .event-guest-actions{flex-direction:column}
 body .event-guest-actions>button{flex:none;width:100%}
}
@media(max-width:600px){
 body .activity-summary-dialog .activity-summary-footer:has([data-summary-center-activity]){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:10px 12px!important}
 body .activity-summary-dialog .activity-summary-footer:has([data-summary-center-activity])>button{width:100%;min-width:0;min-height:44px;font-size:14px;line-height:1.4;padding:10px!important}
 body .activity-summary-dialog .activity-summary-footer:has([data-summary-center-activity])>button:first-child{grid-column:1/-1}
}
/* Date rail follows the two category bars, including wrapped mobile titles. */
body :is(.player-activity-day,.center-activity-day)>.player-date-tab{box-sizing:border-box;position:relative;top:auto;align-self:start;align-content:center;min-height:0}
@media(min-width:851px){
 body :is(.player-activity-day,.center-activity-day)>.player-date-tab{grid-template-columns:1fr 1fr;padding:6px 4px;gap:0 2px}
 body :is(.player-activity-day,.center-activity-day)>.player-date-tab>strong{grid-column:1;grid-row:1/span 2;align-self:center;font-size:26px}
 body :is(.player-activity-day,.center-activity-day)>.player-date-tab>span:first-child{grid-column:2;grid-row:1;font-size:12px}
 body :is(.player-activity-day,.center-activity-day)>.player-date-tab>span:nth-child(3){grid-column:2;grid-row:2;font-size:12px}
 body :is(.player-activity-day,.center-activity-day)>.player-date-tab>small{grid-column:1/-1;grid-row:3;font-size:11px}
}
body .friend-audience-actions{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:16px}
body .friend-audience-actions>button{width:100%;min-width:0;min-height:52px;font-size:16px;line-height:1.4;padding:12px}
body .friend-gender-filters{display:flex;flex-wrap:wrap;gap:10px;margin:18px 0 12px;padding:12px;border:1px solid var(--ui-border);border-radius:12px;background:var(--ui-soft)}
body .friend-gender-filters>label{display:flex;align-items:center;gap:8px;min-height:44px;padding:8px 12px;border:1px solid var(--ui-border);border-radius:10px;background:#fff;font-size:16px;cursor:pointer}
body .friend-gender-filters>label:has(input:checked){background:var(--ui-action);color:white;border-color:var(--ui-action)}
body .friend-gender-filters input{width:18px;height:18px;margin:0;accent-color:var(--ui-action)}
body .friends-dialog .friend-checkbox[hidden]{display:none!important}
body dialog.friends-dialog .friend-audience-actions>button{min-height:56px;font-size:16px;line-height:1.4;padding:12px}
body dialog.friends-dialog .friend-gender-filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
body dialog.friends-dialog .friend-gender-filters>label{flex-direction:column;justify-content:center;min-width:0;gap:6px;padding:8px 4px;font-size:15px;font-weight:650}
body dialog.friends-dialog .friend-type-back{display:grid;place-items:center;flex:0 0 44px;width:44px;min-width:44px;height:44px;min-height:44px;padding:8px;border:1px solid #ffffff80;border-radius:11px;background:#ffffff18;color:white;cursor:pointer}
body .friend-type-back svg,body .center-focus-back svg{width:24px;height:26px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;flex:none}
body .center-notice-focus{width:min(940px,100%);min-height:50dvh;margin:24px auto;display:flex;flex-direction:column;justify-content:center;gap:20px}
body .center-focus-back{display:inline-flex;align-items:center;gap:8px;align-self:start;min-height:44px;font-size:16px;line-height:1.4}
body .center-notice-focus>.center-published-item{width:100%;margin:0}
body .player-day-action-section{display:grid;gap:14px;min-width:0}
body .player-day-action-section>h3{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:4px 0;font-size:18px!important;line-height:1.45;color:var(--ui-ink)}
body .player-day-action-section>h3>span{min-width:30px;padding:4px 8px;text-align:center;border:1px solid var(--ui-border);border-radius:9px;font-size:15px;background:white}
body .player-day-action-section+.player-day-action-section{padding-top:18px;margin-top:6px;border-top:2px solid var(--ui-border)}

/* The date stays beside its day's activities while their contents scroll. */
body :is(.player-activity-day,.center-activity-day)>.player-date-tab{position:sticky;top:calc(var(--interaction-bar-offset,170px) + 10px);align-self:start;z-index:2}
