/* Shared site legal footer + accessibility panel (not floating) */
html{
  -webkit-tap-highlight-color:transparent;
}
*,
*::before,
*::after{
  -webkit-tap-highlight-color:transparent;
}
button,
a,
[role="button"],
.btn,
.a11y-open-btn,
.a11y-report-btn{
  -webkit-user-select:none;
  user-select:none;
  -webkit-touch-callout:none;
}
.site-legal-footer,
.auth-legal-footer,
.foot.site-legal-footer{
  width:100%;
  margin-top:auto;
  padding:16px 12px max(22px, env(safe-area-inset-bottom, 0px));
  display:flex;
  flex-wrap:wrap;
  gap:10px 18px;
  justify-content:center;
  align-items:center;
  border-top:1px solid rgba(199,154,75,.22);
  font-size:13px;
  font-weight:600;
  color:rgba(185,175,149,.9);
  box-sizing:border-box;
  position:relative;
  z-index:1;
}
.site-legal-footer a,
.auth-legal-footer a,
.foot.site-legal-footer a{
  color:var(--gold, #C79A4B);
  text-decoration:none;
  min-height:44px;
  display:inline-flex;
  align-items:center;
  padding:4px 2px;
}
.site-legal-footer a:hover,
.auth-legal-footer a:hover,
.foot.site-legal-footer a:hover{
  text-decoration:underline;
}
.site-legal-footer .a11y-open-btn,
.auth-legal-footer .a11y-open-btn,
.foot .a11y-open-btn{
  appearance:none;
  border:none;
  background:transparent;
  color:inherit;
  border-radius:0;
  width:auto;
  height:auto;
  min-width:44px;
  min-height:44px;
  padding:4px;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  line-height:1;
  font-size:22px;
  box-shadow:none;
}
.site-legal-footer .a11y-open-btn:hover,
.auth-legal-footer .a11y-open-btn:hover,
.foot .a11y-open-btn:hover{
  background:transparent;
  opacity:.85;
}
.site-legal-footer .a11y-open-btn:focus-visible,
.auth-legal-footer .a11y-open-btn:focus-visible,
.foot .a11y-open-btn:focus-visible{
  outline:3px solid #C79A4B;
  outline-offset:2px;
}
.site-legal-copy{
  color:rgba(185,175,149,.9);
  font-weight:600;
}

/* Logged-in app footer sits in document flow after mains; margin-top:auto pins to page bottom */
#appLegalFooter{
  display:none!important;
}
body:not(.auth-locked) #appLegalFooter{
  display:flex!important;
  flex-shrink:0;
  margin-top:auto;
  padding-top:48px;
  background:rgba(14,22,32,.96);
  padding-inline:max(12px, 4vw);
}
body:not(.auth-locked):has(.footer-stack:not(.hidden)) #appLegalFooter{
  padding-bottom:max(28px, calc(env(safe-area-inset-bottom, 0px) + 12px));
  margin-bottom:max(72px, calc(env(safe-area-inset-bottom, 0px) + 72px));
}
body:not(.auth-locked) > .site-legal-footer:not(#appLegalFooter){
  flex-shrink:0;
  margin-top:auto;
  padding-top:48px;
  background:rgba(14,22,32,.96);
  padding-inline:max(12px, 4vw);
}

/* Accessibility dialog */
.a11y-overlay{
  position:fixed;
  inset:0;
  z-index:10050;
  background:rgba(0,0,0,.55);
  display:flex;
  align-items:flex-end;
  justify-content:center;
  padding:0;
}
.a11y-overlay.hidden{display:none!important;}
.a11y-dialog{
  width:min(440px, 100%);
  max-height:min(88vh, 640px);
  overflow:auto;
  background:#141b24;
  color:#F3EBD4;
  border:1px solid rgba(199,154,75,.35);
  border-radius:16px 16px 0 0;
  box-shadow:0 -12px 40px rgba(0,0,0,.4);
  padding:18px 18px max(20px, env(safe-area-inset-bottom, 0px));
  font-family:Assistant,Segoe UI,Tahoma,sans-serif;
}
@media (min-width:720px){
  .a11y-overlay{align-items:center;padding:24px;}
  .a11y-dialog{border-radius:16px;max-height:min(80vh, 640px);}
}
.a11y-dialog-header{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-bottom:14px;
}
.a11y-dialog-header h2{
  margin:0;
  font-size:1.15rem;
  color:#fff;
  line-height:1.3;
}
.a11y-close{
  appearance:none;
  border:1px solid rgba(199,154,75,.4);
  background:transparent;
  color:#F3EBD4;
  width:40px;height:40px;
  border-radius:8px;
  font-size:22px;
  line-height:1;
  cursor:pointer;
}
.a11y-close:hover{background:rgba(199,154,75,.15);}
.a11y-close:focus-visible{outline:3px solid #C79A4B;outline-offset:2px;}
.a11y-lead{
  margin:0 0 14px;
  font-size:13px;
  color:#9A927E;
  line-height:1.5;
}
.a11y-group{
  border:1px solid rgba(199,154,75,.22);
  border-radius:12px;
  padding:12px;
  margin-bottom:10px;
}
.a11y-group-title{
  margin:0 0 10px;
  font-size:13px;
  font-weight:700;
  color:#C79A4B;
}
.a11y-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
}
.a11y-row + .a11y-row{margin-top:8px;}
.a11y-btn{
  appearance:none;
  border:1px solid rgba(199,154,75,.4);
  background:rgba(0,0,0,.25);
  color:#F3EBD4;
  font:inherit;
  font-size:13px;
  font-weight:600;
  border-radius:8px;
  padding:10px 12px;
  min-height:44px;
  cursor:pointer;
  flex:1 1 auto;
}
.a11y-btn:hover{background:rgba(199,154,75,.18);}
.a11y-btn:focus-visible{outline:3px solid #C79A4B;outline-offset:2px;}
.a11y-btn.is-active{
  background:rgba(199,154,75,.28);
  border-color:#C79A4B;
  color:#fff;
}
.a11y-btn-reset{
  width:100%;
  margin-top:4px;
  background:rgba(199,154,75,.14);
  border-color:rgba(199,154,75,.55);
  color:#C79A4B;
  font-weight:700;
}
.a11y-scale-label{
  font-size:13px;
  color:#B9AF95;
  min-width:4.5em;
  text-align:center;
}
.a11y-footer-row{
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  gap:8px 14px;
  margin-top:12px;
}
.a11y-footer-note{
  margin:0;
  font-size:12px;
  color:#9A927E;
  line-height:1.45;
}
.a11y-footer-note a{color:#C79A4B;}

/* Same line / same size as footer note — opposite end */
.a11y-report-btn{
  appearance:none;
  border:none;
  background:transparent;
  color:#9A927E;
  font:inherit;
  font-size:12px;
  font-weight:600;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:0;
  padding:0;
  line-height:1.45;
  flex:0 0 auto;
}
.a11y-report-btn svg{
  flex:0 0 auto;
  width:14px;
  height:14px;
}
.a11y-report-btn:hover{color:#C79A4B;text-decoration:underline;}
.a11y-report-btn:focus-visible{outline:3px solid #C79A4B;outline-offset:2px;}

/* Report violation modal */
.a11y-report-overlay{
  position:fixed;
  inset:0;
  z-index:10060;
  background:rgba(0,0,0,.55);
  display:flex;
  align-items:center;
  justify-content:center;
  padding:16px;
}
.a11y-report-overlay.hidden{display:none!important;}
.a11y-report-dialog{
  width:min(460px,100%);
  max-height:min(90vh,680px);
  overflow:auto;
  background:#fff;
  color:#1a1a1a;
  border-radius:14px;
  box-shadow:0 18px 50px rgba(0,0,0,.35);
  padding:22px 22px 18px;
  font-family:Assistant,Segoe UI,Tahoma,sans-serif;
}
.a11y-report-dialog h2{
  margin:0 0 10px;
  text-align:center;
  font-size:1.25rem;
  color:#111;
  padding-bottom:10px;
  border-bottom:1px solid #e5e5e5;
}
.a11y-report-lead{
  margin:0 0 16px;
  font-size:13px;
  line-height:1.55;
  color:#444;
  text-align:center;
}
.a11y-report-form{display:flex;flex-direction:column;gap:12px;}
.a11y-report-field{display:flex;flex-direction:column;gap:6px;font-size:14px;font-weight:600;color:#222;}
.a11y-report-field input,
.a11y-report-field textarea{
  font:inherit;
  font-weight:400;
  border:1px solid #cfcfcf;
  border-radius:10px;
  padding:10px 12px;
  min-height:44px;
  background:#fff;
  color:#111;
}
.a11y-report-field textarea{min-height:120px;resize:vertical;}
.a11y-report-field input:focus,
.a11y-report-field textarea:focus{
  outline:2px solid #C79A4B;
  outline-offset:1px;
}
.a11y-report-msg{margin:0;min-height:1.2em;font-size:13px;font-weight:600;}
.a11y-report-msg.is-ok{color:#1b7a3a;}
.a11y-report-msg.is-error{color:#b42318;}
.a11y-report-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  justify-content:center;
  margin-top:4px;
}
.a11y-report-close-btn,
.a11y-report-send-btn{
  appearance:none;
  border:none;
  border-radius:999px;
  min-height:44px;
  padding:10px 22px;
  font:inherit;
  font-size:15px;
  font-weight:700;
  cursor:pointer;
  color:#fff;
  flex:1 1 140px;
}
.a11y-report-close-btn{background:#e07a7a;}
.a11y-report-close-btn:hover{background:#d06666;}
.a11y-report-send-btn{background:#2f9e44;}
.a11y-report-send-btn:hover{background:#278a3a;}
.a11y-report-send-btn:disabled{opacity:.65;cursor:wait;}
.a11y-report-close-btn:focus-visible,
.a11y-report-send-btn:focus-visible{
  outline:3px solid #C79A4B;
  outline-offset:2px;
}

/* Applied preference classes on <html> */
html.a11y-high-contrast{
  filter:contrast(1.25) saturate(1.15);
}
html.a11y-grayscale{
  filter:grayscale(1);
}
html.a11y-high-contrast.a11y-grayscale{
  filter:grayscale(1) contrast(1.35);
}
html.a11y-readable-font,
html.a11y-readable-font body{
  font-family:Arial,Helvetica,sans-serif!important;
}
html.a11y-underline-links a{
  text-decoration:underline!important;
  text-underline-offset:2px;
}
html.a11y-reduce-motion *,
html.a11y-reduce-motion *::before,
html.a11y-reduce-motion *::after{
  animation:none!important;
  transition:none!important;
  scroll-behavior:auto!important;
}
html.a11y-strong-focus *:focus{
  outline:3px solid #FFBF00!important;
  outline-offset:3px!important;
}
html.a11y-strong-focus *:focus:not(:focus-visible){
  outline:3px solid #FFBF00!important;
}
/* Scale whole UI (site uses many fixed px sizes; zoom affects them). */
html.a11y-text-scaled{
  zoom:var(--a11y-text-scale, 1);
}
@supports not (zoom: 1){
  html.a11y-text-scaled{
    font-size:calc(100% * var(--a11y-text-scale, 1));
  }
  html.a11y-text-scaled body{
    font-size:calc(1rem * var(--a11y-text-scale, 1))!important;
  }
}
