/* Sticky footer styles
-------------------------------------------------- */
html {
  position: relative;
  min-height: 100%;
  font-size: 14px;
}
@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

html[data-theme="everforest"] {
  --theme-accent: #7fbbb3;
  --theme-accent-rgb: 127, 187, 179;
  --theme-accent-text: #181d20;
  --theme-surface: #343f44;
  --theme-surface-deep: #21272c;
  --theme-muted: #9da9a0;
  --theme-muted-rgb: 157, 169, 160;
  --theme-border: #475258;
  --theme-red: #e67e80;
  --theme-red-rgb: 230, 126, 128;
  --theme-danger-text: #181d20;
  --theme-yellow: #dbbc7f;
  --theme-yellow-rgb: 219, 188, 127;
  --theme-green: #a7c080;
  --theme-green-rgb: 167, 192, 128;
  --theme-blue: #7fbbb3;
  --bs-body-bg: #2d353b;
  --bs-body-color: #d3c6aa;
  --bs-emphasis-color: #d3c6aa;
  --bs-secondary-color: #9da9a0;
  --bs-tertiary-bg: #343f44;
  --bs-border-color: #475258;
  --bs-primary: #7fbbb3;
  --bs-primary-rgb: 127, 187, 179;
  --bs-primary-text-emphasis: #d3c6aa;
  --bs-primary-bg-subtle: #3d484d;
  --bs-primary-border-subtle: #7fbbb3;
  --bs-link-color: #7fbbb3;
  --bs-link-hover-color: #83c092;
}

html[data-theme="solarized-dark"] {
  --theme-accent: #268bd2;
  --theme-accent-rgb: 38, 139, 210;
  --theme-accent-text: #000000;
  --theme-surface: #073642;
  --theme-surface-deep: #00212b;
  --theme-muted: #839496;
  --theme-muted-rgb: 131, 148, 150;
  --theme-border: #586e75;
  --theme-red: #dc322f;
  --theme-red-rgb: 220, 50, 47;
  --theme-danger-text: #000000;
  --theme-yellow: #b58900;
  --theme-yellow-rgb: 181, 137, 0;
  --theme-green: #859900;
  --theme-green-rgb: 133, 153, 0;
  --theme-blue: #268bd2;
  --bs-body-bg: #002b36;
  --bs-body-color: #93a1a1;
  --bs-emphasis-color: #eee8d5;
  --bs-secondary-color: #839496;
  --bs-tertiary-bg: #073642;
  --bs-border-color: #586e75;
  --bs-primary: #268bd2;
  --bs-primary-rgb: 38, 139, 210;
  --bs-primary-text-emphasis: #93c8eb;
  --bs-primary-bg-subtle: #073642;
  --bs-primary-border-subtle: #268bd2;
  --bs-link-color: #2aa198;
  --bs-link-hover-color: #93c8eb;
}

html[data-theme="vantablack"] {
  --theme-accent: #b6b6b6;
  --theme-accent-rgb: 182, 182, 182;
  --theme-accent-text: #000000;
  --theme-surface: #1a1a1a;
  --theme-surface-deep: #090909;
  --theme-muted: #a4a4a4;
  --theme-muted-rgb: 164, 164, 164;
  --theme-border: #505050;
  --theme-red: #a4a4a4;
  --theme-red-rgb: 164, 164, 164;
  --theme-danger-text: #000000;
  --theme-yellow: #cecece;
  --theme-yellow-rgb: 206, 206, 206;
  --theme-green: #b6b6b6;
  --theme-green-rgb: 182, 182, 182;
  --theme-blue: #8d8d8d;
  --bs-body-bg: #000000;
  --bs-body-color: #ececec;
  --bs-emphasis-color: #ffffff;
  --bs-secondary-color: #a4a4a4;
  --bs-tertiary-bg: #1a1a1a;
  --bs-border-color: #505050;
  --bs-primary: #b6b6b6;
  --bs-primary-rgb: 182, 182, 182;
  --bs-primary-text-emphasis: #ffffff;
  --bs-primary-bg-subtle: #1a1a1a;
  --bs-primary-border-subtle: #8d8d8d;
  --bs-link-color: #ececec;
  --bs-link-hover-color: #ffffff;
}

html[data-theme="osaka-jade"] {
  --theme-accent: #509475;
  --theme-accent-rgb: 80, 148, 117;
  --theme-accent-text: #090f0d;
  --theme-surface: #23372b;
  --theme-surface-deep: #0c1512;
  --theme-muted: #81b8a8;
  --theme-muted-rgb: 129, 184, 168;
  --theme-border: #53685b;
  --theme-red: #ff5345;
  --theme-red-rgb: 255, 83, 69;
  --theme-danger-text: #090f0d;
  --theme-yellow: #e5c736;
  --theme-yellow-rgb: 229, 199, 54;
  --theme-green: #63b07a;
  --theme-green-rgb: 99, 176, 122;
  --theme-blue: #8cd3cb;
  --bs-body-bg: #111c18;
  --bs-body-color: #c1c497;
  --bs-emphasis-color: #f7e8b2;
  --bs-secondary-color: #81b8a8;
  --bs-tertiary-bg: #23372b;
  --bs-border-color: #53685b;
  --bs-primary: #509475;
  --bs-primary-rgb: 80, 148, 117;
  --bs-primary-text-emphasis: #acd4cf;
  --bs-primary-bg-subtle: #23372b;
  --bs-primary-border-subtle: #509475;
  --bs-link-color: #8cd3cb;
  --bs-link-hover-color: #acd4cf;
}

html[data-theme="ristretto"] {
  --theme-accent: #f38d70;
  --theme-accent-rgb: 243, 141, 112;
  --theme-accent-text: #181414;
  --theme-surface: #3d2f2a;
  --theme-surface-deep: #211b1b;
  --theme-muted: #c3b7b8;
  --theme-muted-rgb: 195, 183, 184;
  --theme-border: #72696a;
  --theme-red: #fd6883;
  --theme-red-rgb: 253, 104, 131;
  --theme-danger-text: #181414;
  --theme-yellow: #f9cc6c;
  --theme-yellow-rgb: 249, 204, 108;
  --theme-green: #adda78;
  --theme-green-rgb: 173, 218, 120;
  --theme-blue: #f38d70;
  --bs-body-bg: #2c2525;
  --bs-body-color: #e6d9db;
  --bs-emphasis-color: #e6d9db;
  --bs-secondary-color: #c3b7b8;
  --bs-tertiary-bg: #3d2f2a;
  --bs-border-color: #72696a;
  --bs-primary: #f38d70;
  --bs-primary-rgb: 243, 141, 112;
  --bs-primary-text-emphasis: #f8a788;
  --bs-primary-bg-subtle: #403e41;
  --bs-primary-border-subtle: #f38d70;
  --bs-link-color: #f38d70;
  --bs-link-hover-color: #85dacc;
}

html[data-theme="tokyo-night"] {
  --theme-accent: #7aa2f7;
  --theme-accent-rgb: 122, 162, 247;
  --theme-accent-text: #0e0e14;
  --theme-surface: #24283b;
  --theme-surface-deep: #13141c;
  --theme-muted: #b4bee6;
  --theme-muted-rgb: 180, 190, 230;
  --theme-border: #414868;
  --theme-red: #f7768e;
  --theme-red-rgb: 247, 118, 142;
  --theme-danger-text: #0e0e14;
  --theme-yellow: #e0af68;
  --theme-yellow-rgb: 224, 175, 104;
  --theme-green: #9ece6a;
  --theme-green-rgb: 158, 206, 106;
  --theme-blue: #7aa2f7;
  --bs-body-bg: #1a1b26;
  --bs-body-color: #a9b1d6;
  --bs-emphasis-color: #c0caf5;
  --bs-secondary-color: #b4bee6;
  --bs-tertiary-bg: #24283b;
  --bs-border-color: #414868;
  --bs-primary: #7aa2f7;
  --bs-primary-rgb: 122, 162, 247;
  --bs-primary-text-emphasis: #c0caf5;
  --bs-primary-bg-subtle: #292e42;
  --bs-primary-border-subtle: #7aa2f7;
  --bs-link-color: #7aa2f7;
  --bs-link-hover-color: #0db9d7;
}

html[data-theme]:not([data-theme="default"]) {
  --bs-secondary: var(--theme-muted);
  --bs-secondary-rgb: var(--theme-muted-rgb);
  --bs-info: var(--theme-accent);
  --bs-info-rgb: var(--theme-accent-rgb);
  --bs-focus-ring-color: rgba(var(--theme-accent-rgb), 0.25);
  --bs-form-valid-color: var(--theme-green);
  --bs-form-valid-border-color: var(--theme-green);
  --bs-form-invalid-color: var(--theme-red);
  --bs-form-invalid-border-color: var(--theme-red);
  --bs-danger: var(--theme-red);
  --bs-danger-rgb: var(--theme-red-rgb);
  --bs-danger-text-emphasis: var(--theme-red);
  --bs-danger-bg-subtle: color-mix(in srgb, var(--theme-red) 14%, var(--theme-surface-deep));
  --bs-danger-border-subtle: color-mix(in srgb, var(--theme-red) 55%, var(--theme-border));
  --bs-warning: var(--theme-yellow);
  --bs-warning-rgb: var(--theme-yellow-rgb);
  --bs-warning-text-emphasis: var(--theme-yellow);
  --bs-warning-bg-subtle: color-mix(in srgb, var(--theme-yellow) 14%, var(--theme-surface-deep));
  --bs-warning-border-subtle: color-mix(in srgb, var(--theme-yellow) 55%, var(--theme-border));
  --bs-success: var(--theme-green);
  --bs-success-rgb: var(--theme-green-rgb);
  --bs-success-text-emphasis: var(--theme-green);
  --bs-success-bg-subtle: color-mix(in srgb, var(--theme-green) 14%, var(--theme-surface-deep));
  --bs-success-border-subtle: color-mix(in srgb, var(--theme-green) 55%, var(--theme-border));
}

html[data-theme]:not([data-theme="default"]) body {
  background: var(--bs-body-bg);
}

html[data-theme]:not([data-theme="default"]) .calendar-dot {
  box-shadow: 0 0 0 4px rgba(var(--theme-accent-rgb), 0.16);
}

html[data-theme]:not([data-theme="default"]) .calendar-form input:focus {
  border-color: var(--theme-accent);
  box-shadow: 0 0 0 0.25rem rgba(var(--theme-accent-rgb), 0.22);
}

html[data-theme]:not([data-theme="default"]) .btn-primary {
  --bs-btn-color: var(--theme-accent-text);
  --bs-btn-bg: var(--theme-accent);
  --bs-btn-border-color: var(--theme-accent);
  --bs-btn-hover-color: var(--theme-accent-text);
  --bs-btn-hover-bg: color-mix(in srgb, var(--theme-accent) 85%, white);
  --bs-btn-hover-border-color: color-mix(in srgb, var(--theme-accent) 85%, white);
  --bs-btn-active-color: var(--theme-accent-text);
  --bs-btn-active-bg: color-mix(in srgb, var(--theme-accent) 75%, black);
  --bs-btn-active-border-color: var(--theme-accent);
}

html[data-theme]:not([data-theme="default"]) .btn-outline-primary {
  --bs-btn-color: var(--theme-accent);
  --bs-btn-border-color: var(--theme-accent);
  --bs-btn-hover-color: var(--theme-accent-text);
  --bs-btn-hover-bg: var(--theme-accent);
  --bs-btn-hover-border-color: var(--theme-accent);
}

html[data-theme]:not([data-theme="default"]) .btn-secondary {
  --bs-btn-color: var(--theme-accent-text);
  --bs-btn-bg: var(--theme-muted);
  --bs-btn-border-color: var(--theme-muted);
  --bs-btn-hover-color: var(--theme-accent-text);
  --bs-btn-hover-bg: color-mix(in srgb, var(--theme-muted) 84%, white);
  --bs-btn-hover-border-color: var(--theme-muted);
  --bs-btn-active-color: var(--theme-accent-text);
  --bs-btn-active-bg: color-mix(in srgb, var(--theme-muted) 78%, black);
  --bs-btn-active-border-color: var(--theme-muted);
}

html[data-theme]:not([data-theme="default"]) .btn-outline-secondary {
  --bs-btn-color: var(--theme-muted);
  --bs-btn-border-color: var(--theme-border);
  --bs-btn-hover-color: var(--theme-accent-text);
  --bs-btn-hover-bg: var(--theme-muted);
  --bs-btn-hover-border-color: var(--theme-muted);
  --bs-btn-active-color: var(--theme-accent-text);
  --bs-btn-active-bg: var(--theme-muted);
  --bs-btn-active-border-color: var(--theme-muted);
}

html[data-theme]:not([data-theme="default"]) .btn-light {
  --bs-btn-color: var(--bs-body-color);
  --bs-btn-bg: var(--theme-surface);
  --bs-btn-border-color: var(--theme-border);
  --bs-btn-hover-color: var(--bs-emphasis-color);
  --bs-btn-hover-bg: color-mix(in srgb, var(--theme-surface) 82%, white);
  --bs-btn-hover-border-color: var(--theme-muted);
  --bs-btn-active-color: var(--bs-emphasis-color);
  --bs-btn-active-bg: var(--theme-surface-deep);
  --bs-btn-active-border-color: var(--theme-muted);
}

html[data-theme]:not([data-theme="default"]) .btn-danger {
  --bs-btn-color: var(--theme-danger-text);
  --bs-btn-bg: var(--theme-red);
  --bs-btn-border-color: var(--theme-red);
  --bs-btn-hover-color: var(--theme-danger-text);
  --bs-btn-hover-bg: color-mix(in srgb, var(--theme-red) 84%, white);
  --bs-btn-hover-border-color: color-mix(in srgb, var(--theme-red) 84%, white);
  --bs-btn-active-color: var(--theme-danger-text);
  --bs-btn-active-bg: color-mix(in srgb, var(--theme-red) 78%, black);
  --bs-btn-active-border-color: var(--theme-red);
}

html[data-theme]:not([data-theme="default"]) .btn-outline-danger {
  --bs-btn-color: var(--theme-red);
  --bs-btn-border-color: color-mix(in srgb, var(--theme-red) 75%, var(--theme-border));
  --bs-btn-hover-color: var(--theme-danger-text);
  --bs-btn-hover-bg: var(--theme-red);
  --bs-btn-hover-border-color: var(--theme-red);
  --bs-btn-active-color: var(--theme-danger-text);
  --bs-btn-active-bg: var(--theme-red);
  --bs-btn-active-border-color: var(--theme-red);
}

html[data-theme]:not([data-theme="default"]) .btn-outline-warning {
  --bs-btn-color: var(--theme-yellow);
  --bs-btn-border-color: color-mix(in srgb, var(--theme-yellow) 70%, var(--theme-border));
  --bs-btn-hover-color: var(--theme-accent-text);
  --bs-btn-hover-bg: var(--theme-yellow);
  --bs-btn-hover-border-color: var(--theme-yellow);
  --bs-btn-active-color: var(--theme-accent-text);
  --bs-btn-active-bg: var(--theme-yellow);
  --bs-btn-active-border-color: var(--theme-yellow);
}

html[data-theme]:not([data-theme="default"]) .btn-success {
  --bs-btn-color: var(--theme-accent-text);
  --bs-btn-bg: var(--theme-green);
  --bs-btn-border-color: var(--theme-green);
  --bs-btn-hover-color: var(--theme-accent-text);
  --bs-btn-hover-bg: color-mix(in srgb, var(--theme-green) 84%, white);
  --bs-btn-hover-border-color: var(--theme-green);
  --bs-btn-active-color: var(--theme-accent-text);
  --bs-btn-active-bg: color-mix(in srgb, var(--theme-green) 78%, black);
  --bs-btn-active-border-color: var(--theme-green);
}

html[data-theme]:not([data-theme="default"]) .btn-outline-success {
  --bs-btn-color: var(--theme-green);
  --bs-btn-border-color: color-mix(in srgb, var(--theme-green) 70%, var(--theme-border));
  --bs-btn-hover-color: var(--theme-accent-text);
  --bs-btn-hover-bg: var(--theme-green);
  --bs-btn-hover-border-color: var(--theme-green);
  --bs-btn-active-color: var(--theme-accent-text);
  --bs-btn-active-bg: var(--theme-green);
  --bs-btn-active-border-color: var(--theme-green);
}

html[data-theme]:not([data-theme="default"]) .event-filter-tabs,
html[data-theme]:not([data-theme="default"]) .event-scope-tabs {
  --bs-nav-link-color: var(--theme-muted);
  --bs-nav-link-hover-color: var(--bs-emphasis-color);
  --bs-nav-pills-link-active-color: var(--theme-accent-text);
  --bs-nav-pills-link-active-bg: var(--theme-accent);
}

html[data-theme]:not([data-theme="default"]) .alert-info {
  --bs-alert-color: var(--theme-accent);
  --bs-alert-bg: color-mix(in srgb, var(--theme-accent) 14%, var(--theme-surface-deep));
  --bs-alert-border-color: color-mix(in srgb, var(--theme-accent) 50%, var(--theme-border));
  --bs-alert-link-color: var(--theme-accent);
}

html[data-theme]:not([data-theme="default"]) .alert-danger {
  --bs-alert-color: var(--theme-red);
  --bs-alert-bg: color-mix(in srgb, var(--theme-red) 14%, var(--theme-surface-deep));
  --bs-alert-border-color: color-mix(in srgb, var(--theme-red) 50%, var(--theme-border));
  --bs-alert-link-color: var(--theme-red);
}

html[data-theme]:not([data-theme="default"]) .alert-warning {
  --bs-alert-color: var(--theme-yellow);
  --bs-alert-bg: color-mix(in srgb, var(--theme-yellow) 14%, var(--theme-surface-deep));
  --bs-alert-border-color: color-mix(in srgb, var(--theme-yellow) 50%, var(--theme-border));
  --bs-alert-link-color: var(--theme-yellow);
}

html[data-theme]:not([data-theme="default"]) .alert-success {
  --bs-alert-color: var(--theme-green);
  --bs-alert-bg: color-mix(in srgb, var(--theme-green) 14%, var(--theme-surface-deep));
  --bs-alert-border-color: color-mix(in srgb, var(--theme-green) 50%, var(--theme-border));
  --bs-alert-link-color: var(--theme-green);
}

html[data-theme]:not([data-theme="default"]) .text-bg-primary,
html[data-theme]:not([data-theme="default"]) .text-bg-secondary,
html[data-theme]:not([data-theme="default"]) .text-bg-info,
html[data-theme]:not([data-theme="default"]) .text-bg-warning,
html[data-theme]:not([data-theme="default"]) .text-bg-success {
  color: var(--theme-accent-text) !important;
}

html[data-theme]:not([data-theme="default"]) .text-bg-danger {
  color: var(--theme-danger-text) !important;
}

html[data-theme]:not([data-theme="default"]) .event-location-colored,
html[data-theme]:not([data-theme="default"]) .mobile-event-location-colored {
  --theme-location-color: color-mix(in srgb, hsl(var(--location-hue) 58% 55%) 30%, var(--theme-accent));
}

html[data-theme]:not([data-theme="default"]) .event-location-colored {
  --bs-table-bg: color-mix(in srgb, var(--theme-location-color) 9%, var(--theme-surface-deep));
  --bs-table-hover-bg: color-mix(in srgb, var(--theme-location-color) 16%, var(--theme-surface-deep));
}

html[data-theme]:not([data-theme="default"]) .event-location-colored > td:first-child,
html[data-theme]:not([data-theme="default"]) .mobile-event-location-colored {
  border-left-color: var(--theme-location-color);
}

html[data-theme]:not([data-theme="default"]) .mobile-event-location-colored {
  background: color-mix(in srgb, var(--theme-location-color) 9%, var(--theme-surface-deep));
}

html[data-theme]:not([data-theme="default"]) .location-chip,
html[data-theme]:not([data-theme="default"]) .mobile-location-link {
  border-color: color-mix(in srgb, var(--theme-location-color, var(--theme-accent)) 60%, var(--theme-border));
  color: var(--bs-body-color);
  background: color-mix(in srgb, var(--theme-location-color, var(--theme-accent)) 15%, var(--theme-surface-deep));
}

html[data-theme]:not([data-theme="default"]) .location-chip:hover,
html[data-theme]:not([data-theme="default"]) .mobile-location-link:hover {
  color: var(--bs-emphasis-color);
  background: color-mix(in srgb, var(--theme-location-color, var(--theme-accent)) 24%, var(--theme-surface-deep));
}

html[data-theme]:not([data-theme="default"]) .location-color-dot {
  background: var(--theme-location-color, var(--theme-accent));
}

html[data-theme]:not([data-theme="default"]) .event-external-calendar {
  --bs-table-bg: var(--theme-surface-deep);
  --bs-table-hover-bg: var(--theme-surface);
}

html[data-theme]:not([data-theme="default"]) .event-external-calendar > td:first-child,
html[data-theme]:not([data-theme="default"]) .mobile-event-external-calendar {
  border-left-color: var(--theme-muted);
}

html[data-theme]:not([data-theme="default"]) .mobile-event-external-calendar {
  background: var(--theme-surface-deep);
}

html[data-theme]:not([data-theme="default"]) .mobile-event-external-calendar .mobile-event-date {
  color: var(--theme-muted);
  background: var(--theme-surface);
}

html[data-theme]:not([data-theme="default"]) .event-external-calendar .location-color-dot,
html[data-theme]:not([data-theme="default"]) .mobile-event-external-calendar .location-color-dot {
  background: var(--theme-muted);
}

html[data-theme]:not([data-theme="default"]) .event-external-calendar .location-chip,
html[data-theme]:not([data-theme="default"]) .event-external-calendar .calendar-label,
html[data-theme]:not([data-theme="default"]) .mobile-event-external-calendar .calendar-label,
html[data-theme]:not([data-theme="default"]) .mobile-event-external-calendar .mobile-location-link,
html[data-theme]:not([data-theme="default"]) .event-external-calendar .event-type-game,
html[data-theme]:not([data-theme="default"]) .event-external-calendar .event-type-practice,
html[data-theme]:not([data-theme="default"]) .event-external-calendar .event-type-tournament,
html[data-theme]:not([data-theme="default"]) .mobile-event-external-calendar .event-type-game,
html[data-theme]:not([data-theme="default"]) .mobile-event-external-calendar .event-type-practice,
html[data-theme]:not([data-theme="default"]) .mobile-event-external-calendar .event-type-tournament {
  border-color: var(--theme-border);
  color: var(--theme-muted);
  background: var(--theme-surface);
}

html[data-theme]:not([data-theme="default"]) .event-type-game {
  color: var(--theme-accent-text);
  background: var(--theme-blue);
}

html[data-theme]:not([data-theme="default"]) .event-type-practice {
  color: var(--theme-accent-text);
  background: var(--theme-yellow);
}

html[data-theme]:not([data-theme="default"]) .event-type-tournament {
  color: var(--theme-accent-text);
  background: var(--theme-green);
}

html[data-theme]:not([data-theme="default"]) .event-type-other {
  color: var(--bs-body-color);
  background: var(--theme-surface);
}

html[data-theme]:not([data-theme="default"]) .game-gap-badge,
html[data-theme]:not([data-theme="default"]) .mobile-game-gap {
  border-color: var(--theme-yellow);
  box-shadow: none;
  color: var(--bs-emphasis-color);
  background: color-mix(in srgb, var(--theme-yellow) 16%, var(--theme-surface-deep));
}

html[data-theme]:not([data-theme="default"]) .game-gap-badge-tight,
html[data-theme]:not([data-theme="default"]) .mobile-game-gap-tight {
  border-color: var(--theme-red);
  box-shadow: none;
  color: var(--bs-emphasis-color);
  background: color-mix(in srgb, var(--theme-red) 18%, var(--theme-surface-deep));
}

.container {
  max-width: 1180px;
}

a {
  text-underline-offset: 2px;
}

.page-narrow {
  max-width: 720px;
  margin-inline: auto;
}

.back-link {
  color: var(--bs-secondary-color);
  text-decoration: none;
}

.back-link:hover {
  color: var(--bs-body-color);
}

.calendar-form input {
  display: block;
  width: 100%;
  padding: 0.625rem 0.75rem;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
}

.calendar-form input:focus {
  border-color: #86b7fe;
  box-shadow: 0 0 0 0.25rem rgb(13 110 253 / 25%);
  outline: 0;
}

.calendar-form input[type="checkbox"] {
  display: inline-block;
  width: auto;
}

.event-filter-bar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.event-scope-tabs {
  flex: 0 0 auto;
  margin-left: auto;
}

.schedule-conflict {
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
  color: var(--bs-danger-text-emphasis);
  font-size: 0.75rem;
}

.schedule-conflict-details {
  line-height: 1.35;
}

.calendar-collapse-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.75rem;
  color: var(--bs-body-color);
  background: var(--bs-tertiary-bg);
  text-align: left;
}

.calendar-collapse-toggle:hover {
  border-color: var(--bs-primary-border-subtle);
  background: var(--bs-primary-bg-subtle);
}

.calendar-collapse-chevron {
  font-size: 1.5rem;
  line-height: 1;
  transition: transform 0.2s ease;
}

.calendar-collapse-toggle[aria-expanded="true"] .calendar-collapse-chevron {
  transform: rotate(180deg);
}

.calendar-list {
  overflow: hidden;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.75rem;
  background: var(--bs-body-bg);
}

.calendar-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--bs-border-color);
}

.calendar-row:last-child {
  border-bottom: 0;
}

.calendar-inactive {
  background: var(--bs-tertiary-bg);
}

.calendar-dot {
  width: 0.7rem;
  height: 0.7rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--bs-primary);
  box-shadow: 0 0 0 4px rgb(13 110 253 / 12%);
}

.calendar-dot-inactive {
  background: var(--bs-secondary);
  box-shadow: none;
}

.calendar-info {
  min-width: 0;
  flex: 1;
}

.calendar-actions {
  display: flex;
  gap: 0.5rem;
}

.saved-links {
  padding: 1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.75rem;
  background: var(--bs-tertiary-bg);
}

.saved-link-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--bs-border-color);
}

.saved-link-url {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.saved-link-edit {
  position: relative;
}

.saved-link-edit summary {
  color: var(--bs-primary);
  cursor: pointer;
  font-size: 0.875rem;
  list-style: none;
}

.saved-link-edit summary::-webkit-details-marker {
  display: none;
}

.saved-link-edit-form {
  position: absolute;
  z-index: 10;
  top: calc(100% + 0.5rem);
  right: 0;
  display: flex;
  width: min(32rem, 80vw);
  gap: 0.5rem;
  padding: 0.75rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.5rem;
  box-shadow: 0 0.5rem 1.5rem rgb(0 0 0 / 12%);
  background: var(--bs-body-bg);
}

.saved-link-add-form {
  display: grid;
  grid-template-columns: minmax(8rem, 0.6fr) minmax(12rem, 1.4fr) auto;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

@media (max-width: 575.98px) {
  .saved-link-add-form {
    grid-template-columns: 1fr;
  }

  .saved-link-add-form .btn {
    width: 100%;
  }
}

.calendar-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.calendar-stat {
  display: flex;
  min-height: 6rem;
  flex-direction: column;
  justify-content: center;
  padding: 1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.75rem;
  background: var(--bs-body-bg);
}

.calendar-stat-primary {
  color: var(--bs-primary-text-emphasis);
  border-color: var(--bs-primary-border-subtle);
  background: var(--bs-primary-bg-subtle);
}

.calendar-stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.1;
}

.calendar-stat-label {
  margin-top: 0.25rem;
  color: var(--bs-secondary-color);
  font-size: 0.8rem;
}

.calendar-metadata {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.6rem 1rem;
  font-size: 0.875rem;
}

.calendar-metadata dt {
  color: var(--bs-secondary-color);
  font-weight: 500;
}

.calendar-metadata dd {
  min-width: 0;
  margin: 0;
  text-align: right;
  overflow-wrap: anywhere;
}

.event-table-wrap {
  overflow: hidden;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.75rem;
  box-shadow: 0 0.25rem 1.25rem rgb(0 0 0 / 4%);
}

.event-table thead th {
  padding: 0.8rem 1rem;
  border-bottom-width: 1px;
  color: var(--bs-secondary-color);
  background: var(--bs-tertiary-bg);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.event-table tbody td {
  padding: 0.85rem 1rem;
}

.event-title-cell {
  position: relative;
}

.game-gap-badge {
  position: absolute;
  z-index: 5;
  bottom: -0.8rem;
  left: 50%;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.65rem;
  border: 1px solid #fb923c;
  border-radius: 999px;
  box-shadow: 0 0.2rem 0.65rem rgb(234 88 12 / 28%);
  color: #7c2d12;
  background: #ffedd5;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
  transform: translateX(-50%);
}

.game-gap-detail {
  padding-left: 0.5rem;
  border-left: 1px solid rgb(124 45 18 / 30%);
}

.game-gap-badge-tight {
  border-color: #ef4444;
  box-shadow: 0 0.2rem 0.65rem rgb(220 38 38 / 28%);
  color: #7f1d1d;
  background: #fee2e2;
}

.game-gap-badge-tight .game-gap-detail {
  border-left-color: rgb(127 29 29 / 30%);
}

.event-date {
  width: 5rem;
  text-align: center;
}

.event-month,
.event-day,
.event-weekday {
  display: block;
  line-height: 1;
}

.event-month {
  color: var(--bs-primary);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.event-day {
  margin-block: 0.15rem;
  font-size: 1.5rem;
  font-weight: 700;
}

.event-weekday {
  color: var(--bs-secondary-color);
  font-size: 0.7rem;
}

.event-location-colored {
  --bs-table-bg: hsl(var(--location-hue) 72% 97%);
  --bs-table-hover-bg: hsl(var(--location-hue) 70% 94%);
}

.event-location-colored > td:first-child {
  border-left: 0.35rem solid hsl(var(--location-hue) 68% 48%);
}

.event-external-calendar {
  --bs-table-bg: #f5f5f4;
  --bs-table-hover-bg: #eeeeec;
}

.event-external-calendar > td:first-child {
  border-left: 0.35rem solid #a8a29e;
}

.event-external-calendar .location-chip {
  border-color: #d6d3d1;
  color: #57534e;
  background: #e7e5e4;
}

.event-external-calendar .location-chip:hover {
  color: #44403c;
  background: #d6d3d1;
}

.event-external-calendar .location-color-dot {
  background: #78716c;
}

.event-external-calendar .calendar-label,
.mobile-event-external-calendar .calendar-label {
  color: #57534e;
  background: #e7e5e4;
}

.event-external-calendar .event-type-game,
.event-external-calendar .event-type-practice,
.event-external-calendar .event-type-tournament,
.mobile-event-external-calendar .event-type-game,
.mobile-event-external-calendar .event-type-practice,
.mobile-event-external-calendar .event-type-tournament {
  color: #57534e;
  background: #e7e5e4;
}

.map-link {
  color: inherit;
  text-decoration-color: var(--bs-border-color);
}

.map-link:hover {
  color: var(--bs-primary);
  text-decoration-color: currentColor;
}

.location-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.55rem;
  border: 1px solid hsl(var(--location-hue) 55% 75%);
  border-radius: 999px;
  color: hsl(var(--location-hue) 55% 25%);
  background: hsl(var(--location-hue) 72% 91%);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}

.location-chip:hover {
  color: hsl(var(--location-hue) 65% 18%);
  background: hsl(var(--location-hue) 72% 87%);
}

.location-color-dot {
  width: 0.55rem;
  height: 0.55rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: hsl(var(--location-hue) 68% 45%);
}

.calendar-label {
  display: inline-block;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  color: var(--bs-primary-text-emphasis);
  background: var(--bs-primary-bg-subtle);
  font-size: 0.8rem;
  text-decoration: none;
  white-space: nowrap;
}

.calendar-label:hover {
  color: var(--bs-primary-text-emphasis);
  background: var(--bs-primary-border-subtle);
  text-decoration: underline;
}

.event-cancelled td {
  opacity: 0.6;
  text-decoration: line-through;
}

.mobile-event-list {
  display: grid;
  gap: 1rem;
}

.mobile-event-card {
  position: relative;
  overflow: visible;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.85rem;
  box-shadow: 0 0.25rem 1rem rgb(0 0 0 / 7%);
  background: var(--bs-body-bg);
}

.mobile-event-location-colored {
  border-left: 0.35rem solid hsl(var(--location-hue) 68% 48%);
  background: hsl(var(--location-hue) 72% 98%);
}

.mobile-event-external-calendar {
  border-left: 0.35rem solid #a8a29e;
  box-shadow: 0 0.15rem 0.5rem rgb(87 83 78 / 8%);
  background: #f5f5f4;
}

.mobile-event-external-calendar .mobile-event-date {
  color: #57534e;
  background: #e7e5e4;
}

.mobile-event-external-calendar .mobile-location-link {
  border-color: #d6d3d1;
  color: #57534e;
  background: #e7e5e4;
}

.mobile-event-external-calendar .mobile-location-link:hover {
  color: #44403c;
  background: #d6d3d1;
}

.mobile-event-external-calendar .location-color-dot {
  background: #78716c;
}

.mobile-event-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.8rem 0.9rem;
  border-bottom: 1px solid rgb(0 0 0 / 7%);
}

.mobile-event-when {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 0.75rem;
}

.mobile-event-date {
  display: grid;
  min-width: 3.2rem;
  place-items: center;
  padding: 0.35rem 0.5rem;
  border-radius: 0.6rem;
  color: var(--bs-primary-text-emphasis);
  background: var(--bs-primary-bg-subtle);
  line-height: 1;
}

.mobile-event-date span {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mobile-event-date strong {
  margin-top: 0.2rem;
  font-size: 1.45rem;
}

.mobile-event-time {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.mobile-event-time span {
  color: var(--bs-secondary-color);
  font-size: 0.75rem;
  font-weight: 600;
}

.mobile-event-time strong {
  font-size: 1rem;
  white-space: nowrap;
}

.mobile-calendar-label {
  max-width: 45%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-event-body {
  padding: 1rem 0.9rem 0.85rem;
}

.mobile-event-title {
  margin: 0 0 0.65rem;
  font-size: 1.15rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.mobile-event-title a {
  color: inherit;
}

.mobile-location-link {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0 0.9rem 0.9rem;
  padding: 0.7rem 0.75rem;
  border: 1px solid hsl(var(--location-hue) 55% 78%);
  border-radius: 0.65rem;
  color: hsl(var(--location-hue) 55% 24%);
  background: hsl(var(--location-hue) 72% 92%);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
}

.mobile-location-link:hover {
  color: hsl(var(--location-hue) 65% 18%);
  background: hsl(var(--location-hue) 72% 88%);
}

.mobile-location-link .location-color-dot {
  margin-top: 0.3rem;
}

.mobile-location-text {
  min-width: 0;
  flex: 1;
  overflow-wrap: anywhere;
}

.mobile-location-arrow {
  flex: 0 0 auto;
  font-size: 1rem;
}

.mobile-event-cancelled {
  opacity: 0.65;
}

.mobile-event-cancelled .mobile-event-title {
  text-decoration: line-through;
}

.mobile-event-has-gap {
  margin-bottom: 3.5rem;
}

.mobile-game-gap {
  position: absolute;
  z-index: 5;
  bottom: -2.75rem;
  left: 50%;
  display: flex;
  width: calc(100% - 1.5rem);
  min-height: 2.25rem;
  align-items: center;
  justify-content: center;
  gap: 0.25rem 0.6rem;
  padding: 0.45rem 0.65rem;
  border: 1px solid #fb923c;
  border-radius: 0.7rem;
  box-shadow: 0 0.2rem 0.65rem rgb(234 88 12 / 24%);
  color: #7c2d12;
  background: #ffedd5;
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  transform: translateX(-50%);
}

.mobile-game-gap-detail {
  padding-left: 0.6rem;
  border-left: 1px solid rgb(124 45 18 / 30%);
}

.mobile-game-gap-tight {
  border-color: #ef4444;
  box-shadow: 0 0.2rem 0.65rem rgb(220 38 38 / 24%);
  color: #7f1d1d;
  background: #fee2e2;
}

.mobile-game-gap-tight .mobile-game-gap-detail {
  border-left-color: rgb(127 29 29 / 30%);
}

.event-type-game {
  color: #084298;
  background: #cfe2ff;
}

.event-type-practice {
  color: #664d03;
  background: #fff3cd;
}

.event-type-tournament {
  color: #0f5132;
  background: #d1e7dd;
}

.event-type-other {
  color: #41464b;
  background: #e2e3e5;
}

.event-filter-tabs,
.event-scope-tabs {
  flex-wrap: nowrap;
  padding: 0.15rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.55rem;
  background: var(--bs-tertiary-bg);
}

.event-filter-tabs .nav-link,
.event-scope-tabs .nav-link {
  padding: 0.25rem 0.65rem;
  font-size: 0.85rem;
  white-space: nowrap;
}

.event-all-filter {
  width: 8.5rem;
  min-width: 0;
}

.api-log-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.75rem;
}

.api-log-list {
  overflow: hidden;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.75rem;
  background: var(--bs-body-bg);
}

.api-log-entry {
  padding: 1rem;
  border-bottom: 1px solid var(--bs-border-color);
}

.api-log-entry:last-child {
  border-bottom: 0;
}

.api-log-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.api-log-details {
  margin-top: 0.5rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.5rem;
  background: var(--bs-tertiary-bg);
}

.api-log-details summary {
  padding: 0.55rem 0.75rem;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
}

.api-log-details pre {
  max-height: 28rem;
  margin: 0;
  padding: 0.75rem;
  overflow: auto;
  border-top: 1px solid var(--bs-border-color);
  background: var(--bs-body-bg);
  font-size: 0.75rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.rule-list {
  overflow: hidden;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.75rem;
}

.rule-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
  border-bottom: 1px solid var(--bs-border-color);
}

.rule-row:last-child {
  border-bottom: 0;
}

.rule-inactive {
  opacity: 0.65;
  background: var(--bs-tertiary-bg);
}

.rule-priority {
  display: grid;
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: var(--bs-secondary-color);
  background: var(--bs-tertiary-bg);
  font-size: 0.75rem;
  font-weight: 700;
}

.rule-info {
  min-width: 0;
  flex: 1;
}

.rule-actions {
  display: flex;
  gap: 0.35rem;
}

.rule-form-card {
  top: 1rem;
}

.rule-form input[type="text"],
.rule-form input[type="number"],
.rule-form select {
  display: block;
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius);
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
}

.visibility-row-hidden > td {
  color: var(--bs-secondary-color);
  background: var(--bs-tertiary-bg);
  opacity: 0.78;
}

.visibility-preview-table td:last-child {
  min-width: 15rem;
}

.rule-form input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
}

.empty-rules {
  padding: 3rem 1.5rem;
  border: 1px dashed var(--bs-border-color);
  border-radius: 0.75rem;
  background: var(--bs-tertiary-bg);
}

.empty-state {
  padding: 5rem 1rem;
  border: 1px dashed var(--bs-border-color);
  border-radius: 0.75rem;
  background: var(--bs-tertiary-bg);
}

.empty-state-icon {
  margin-bottom: 0.75rem;
  font-size: 2.5rem;
}

@media (max-width: 767.98px) {
  .api-log-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .api-log-summary {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 575.98px) {
  .event-filter-bar {
    flex-wrap: wrap;
    gap: 0.35rem;
  }

  .event-filter-tabs .nav-link,
  .event-scope-tabs .nav-link {
    padding: 0.2rem 0.45rem;
    font-size: 0.78rem;
    text-align: center;
  }

  .event-all-filter {
    width: 100%;
    order: 3;
  }

  .calendar-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .calendar-actions {
    width: 100%;
    padding-left: 1.45rem;
    flex-wrap: wrap;
  }

  .rule-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .rule-actions {
    width: 100%;
    padding-left: 3rem;
    flex-wrap: wrap;
  }
}

.pricing-header {
  max-width: 700px;
}

.access-gate {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 2rem 0;
}

.access-card {
  width: min(100%, 26rem);
  padding: 2rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 1rem;
  background: var(--bs-body-bg);
  box-shadow: 0 1rem 3rem rgb(0 0 0 / 8%);
}

.theme-grid {
  display: grid;
  gap: 0.75rem;
}

.theme-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.75rem;
  color: var(--bs-body-color);
  background: var(--bs-body-bg);
  text-align: left;
}

.theme-option:hover {
  border-color: var(--bs-primary-border-subtle);
  background: var(--bs-tertiary-bg);
}

.theme-option-active {
  border-color: var(--bs-primary);
  box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.15);
}

.theme-option strong,
.theme-option small {
  display: block;
}

.theme-option small {
  margin-top: 0.15rem;
  color: var(--bs-secondary-color);
}

.theme-swatches {
  display: grid;
  grid-template-columns: repeat(2, 1.15rem);
  overflow: hidden;
  border: 1px solid var(--bs-border-color);
  border-radius: 0.35rem;
}

.theme-swatches span {
  width: 1.15rem;
  height: 1.15rem;
  background: var(--swatch);
}

.theme-check {
  visibility: hidden;
  color: var(--bs-primary);
  font-size: 1.2rem;
  font-weight: 700;
}

.theme-option-active .theme-check {
  visibility: visible;
}

.shared-access-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 1rem;
}

.build-version,
.build-version a,
.build-version code {
  color: var(--bs-secondary-color);
  font-size: 0.75rem;
}

.build-version a {
  text-decoration: none;
}

.build-version a:hover {
  text-decoration: underline;
}

.footer-actions,
.footer-meta,
.footer-saved-links {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.footer-actions {
  align-items: center;
  flex: 0 0 auto;
  gap: 0;
}

.footer-actions form {
  margin: 0;
}

.footer-actions .btn {
  padding-inline: 0.35rem;
  font-size: 0.75rem;
}

.footer-saved-links {
  padding-left: 0.75rem;
  border-left: 1px solid var(--bs-border-color);
  font-size: 0.75rem;
}

.footer-saved-links a {
  max-width: 16rem;
  overflow: hidden;
  color: var(--bs-secondary-color);
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.footer-saved-links a:hover {
  color: var(--bs-primary);
  text-decoration: underline;
}
