.ada-trigger {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100000;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #1a4b8c;
  color: #fff;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease, transform 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

.ada-trigger:hover {
  background: #0a1e3d;
  transform: scale(1.05);
}

.ada-trigger:focus-visible {
  outline: 3px solid #c9a84c;
  outline-offset: 3px;
}

.ada-trigger svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.ada-panel {
  position: fixed;
  bottom: 92px;
  right: 24px;
  z-index: 100001;
  width: 320px;
  max-height: calc(100vh - 120px);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.2);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.96);
  transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ada-panel.ada-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.ada-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 20px 16px;
  border-bottom: 1px solid #e5e7eb;
  flex-shrink: 0;
}

.ada-panel-header h2 {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #0a1e3d;
  margin: 0;
  line-height: 1.3;
}

.ada-panel-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: #f3f4f6;
  color: #374151;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.ada-panel-close:hover {
  background: #e5e7eb;
}

.ada-panel-body {
  padding: 16px 20px 20px;
  overflow-y: auto;
  flex: 1;
}

.ada-group {
  margin-bottom: 20px;
}

.ada-group:last-child {
  margin-bottom: 0;
}

.ada-group-label {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
  margin-bottom: 10px;
  display: block;
}

.ada-font-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ada-font-btn {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #0a1e3d;
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.ada-font-btn:hover {
  background: #f3f4f6;
  border-color: #1a4b8c;
}

.ada-font-btn:active {
  background: #e5e7eb;
}

.ada-font-value {
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  color: #0a1e3d;
  min-width: 48px;
  text-align: center;
}

.ada-toggles {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ada-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #fff;
  cursor: pointer;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.ada-toggle:hover {
  background: #f9fafb;
  border-color: #d1d5db;
}

.ada-toggle.ada-active {
  background: #eff6ff;
  border-color: #1a4b8c;
}

.ada-toggle-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 0.85rem;
  font-weight: 500;
  color: #1f2937;
}

.ada-toggle-icon {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ada-toggle-icon svg {
  width: 100%;
  height: 100%;
}

.ada-switch {
  width: 40px;
  height: 22px;
  border-radius: 11px;
  background: #d1d5db;
  position: relative;
  flex-shrink: 0;
  transition: background 0.2s ease;
}

.ada-active .ada-switch {
  background: #1a4b8c;
}

.ada-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  transition: transform 0.2s ease;
}

.ada-active .ada-switch::after {
  transform: translateX(18px);
}

.ada-reset {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  color: #374151;
  font-family: 'Inter', -apple-system, sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 8px;
  -webkit-tap-highlight-color: transparent;
}

.ada-reset:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
}

#ada-filter-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 99990;
  display: none;
}

#ada-filter-overlay.ada-active-overlay {
  display: block;
}

body.ada-highlight-links a {
  outline: 2px solid #2563eb !important;
  outline-offset: 2px;
  text-decoration: underline !important;
}

body.ada-big-cursor,
body.ada-big-cursor * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 32 32'%3E%3Cpath d='M4 4l20 8-8 4-4 8z' fill='black' stroke='white' stroke-width='1'/%3E%3C/svg%3E") 4 4, auto !important;
}

body.ada-text-spacing p,
body.ada-text-spacing li,
body.ada-text-spacing span,
body.ada-text-spacing td,
body.ada-text-spacing blockquote {
  letter-spacing: 0.05em !important;
  word-spacing: 0.12em !important;
  line-height: 2 !important;
}

@font-face {
  font-family: 'OpenDyslexic';
  src: url('https://cdn.jsdelivr.net/npm/open-dyslexic@1.0.3/open-dyslexic-regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

body.ada-dyslexia-font,
body.ada-dyslexia-font * {
  font-family: 'OpenDyslexic', 'Comic Sans MS', 'Arial', sans-serif !important;
}

@media (max-width: 480px) {
  .ada-panel {
    right: 12px;
    left: 12px;
    width: auto;
    bottom: 88px;
    max-height: calc(100vh - 110px);
  }

  .ada-trigger {
    bottom: 20px;
    right: 20px;
    width: 52px;
    height: 52px;
  }
}
