.cookie-banner {
  position: fixed;
  z-index: 10000;
  left: 1rem;
  right: 1rem;
  bottom: max(1rem, env(safe-area-inset-bottom));
  box-sizing: border-box;
  width: auto;
  max-width: 980px;
  max-height: min(88vh, 560px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 0 auto;
  padding: 1.1rem 1.25rem;
  background: #fff;
  color: #171923;
  border: 1px solid #d7dbe3;
  border-radius: 16px;
  box-shadow: 0 16px 55px #0004;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 390px);
  align-items: center;
  gap: .8rem 1.25rem;
}
.cookie-banner[hidden],
.cookie-banner [hidden] { display: none !important; }
.cookie-banner-copy { min-width: 0; overflow-wrap: anywhere; }
.cookie-banner h2 { font-size: 1.15rem; line-height: 1.3; margin: 0 0 .35rem; }
.cookie-banner p { margin: .3rem 0; color: #4c5565; font-size: .92rem; line-height: 1.5; }
.cookie-banner-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; }
.cookie-banner button {
  min-width: 0;
  min-height: 44px;
  border: 1px solid #cbd1db;
  border-radius: 9px;
  padding: .6rem .55rem;
  background: #fff;
  color: #171923;
  font: 650 .88rem/1.25 system-ui, sans-serif;
  overflow-wrap: anywhere;
  cursor: pointer;
}
.cookie-banner button:focus-visible { outline: 3px solid #e10600; outline-offset: 2px; }
.cookie-banner .cookie-primary { background: #e10600; border-color: #e10600; color: #fff; }
.cookie-settings { grid-column: 1 / -1; min-width: 0; display: grid; gap: .65rem; padding-top: .5rem; }
.cookie-settings-actions { display: flex; justify-content: flex-end; gap: .5rem; }
.cookie-settings-actions button { min-width: 130px; }
.cookie-settings > label { display: flex; align-items: flex-start; gap: .65rem; padding: .7rem; border: 1px solid #e1e5ec; border-radius: 10px; }
.cookie-settings input { flex: 0 0 auto; width: 1rem; height: 1rem; margin: .2rem 0 0; accent-color: #e10600; }
.cookie-settings label span { min-width: 0; display: grid; gap: .15rem; overflow-wrap: anywhere; }
.cookie-settings small { color: #596273; line-height: 1.4; }
.cookie-live { grid-column: 1 / -1; }
.cookie-footer-manage { background: none; border: 0; color: inherit; text-decoration: underline; font: inherit; cursor: pointer; }
.standing-filters, .session-filters, .profile-related-links { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; margin: 1rem 0; }
.profile-related-links a { padding: .55rem .8rem; border: 1px solid #d2d6df; border-radius: 9px; text-decoration: none; font-weight: 600; }
.standing-filters input, .standing-filters select, .session-filters input, .session-filters select { min-height: 42px; padding: .55rem .75rem; border: 1px solid #cbd1db; border-radius: 9px; background: #fff; color: #15151e; font: inherit; }
.standing-filters input, .session-filters input { min-width: min(100%, 260px); }
.standing-filters output, .session-filters output { margin-left: auto; color: #747b88; font-size: .88rem; }
.session-filtered-out, .standings-filtered-out { display: none !important; }
.result-table a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
html[data-theme=dark] .cookie-banner { background: #1d2028; color: #f5f6f8; border-color: #3a3f49; }
html[data-theme=dark] .cookie-banner p, html[data-theme=dark] .cookie-settings small { color: #c1c7d0; }
html[data-theme=dark] .cookie-banner button { background: #292d36; color: #f5f6f8; border-color: #4a505c; }
html[data-theme=dark] .cookie-banner .cookie-primary { background: #e10600; border-color: #e10600; color: #fff; }
html[data-theme=dark] .cookie-settings > label, html[data-theme=dark] .profile-related-links a { border-color: #3b414c; }
html[data-theme=dark] .standing-filters input, html[data-theme=dark] .standing-filters select, html[data-theme=dark] .session-filters input, html[data-theme=dark] .session-filters select { background: #20232b; color: #f5f6f8; border-color: #484f5b; }
@media (max-width: 860px) {
  .cookie-banner { left: .75rem; right: .75rem; bottom: max(.75rem, env(safe-area-inset-bottom)); max-height: 88vh; padding: 1rem; grid-template-columns: minmax(0, 1fr); }
  .cookie-settings { grid-column: 1; }
  .standing-filters, .session-filters { align-items: stretch; }
  .standing-filters input, .session-filters input, .standing-filters select, .session-filters select { width: 100%; }
}
@media (max-width: 560px) {
  .cookie-banner { left: .5rem; right: .5rem; bottom: max(.5rem, env(safe-area-inset-bottom)); max-height: 86vh; padding: .85rem; border-radius: 13px; gap: .65rem; }
  .cookie-banner-actions { grid-template-columns: minmax(0, 1fr); }
  .cookie-banner-actions button { width: 100%; }
  .cookie-settings-actions { display: grid; grid-template-columns: minmax(0, 1fr); }
  .cookie-settings-actions button { width: 100%; }
}
@supports (max-height: 85dvh) { .cookie-banner { max-height: min(88dvh, 560px); } }
