/* ---------- Widget ---------- */
#mua-root {
  --mua-accent: #1d4ed8;
  --mua-ink: #16181d;
  --mua-line: #d9dde5;
  position: fixed;
  bottom: 20px;
  z-index: 2147483000;
  font: 15px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--mua-ink);
  letter-spacing: normal;
  word-spacing: normal;
  text-align: left;
}
#mua-root.mua-right { right: 20px; }
#mua-root.mua-left { left: 20px; }
#mua-root *, #mua-root *::before, #mua-root *::after { box-sizing: border-box; }
#mua-root button { all: unset; box-sizing: border-box; cursor: pointer; font: inherit; color: inherit; }
#mua-root button:focus-visible, #mua-root a:focus-visible { outline: 3px solid var(--mua-accent); outline-offset: 2px; }

#mua-root #mua-toggle {
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--mua-accent); color: #fff;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .28);
}
#mua-root #mua-toggle svg { width: 30px; height: 30px; }
#mua-root #mua-toggle:focus-visible { outline: 3px solid #000; box-shadow: 0 0 0 3px #fff; outline-offset: 3px; }

#mua-panel {
  position: absolute; bottom: 68px;
  width: min(340px, calc(100vw - 40px));
  max-height: calc(100vh - 110px); overflow: auto;
  background: #fff; border: 1px solid var(--mua-line); border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .22);
}
#mua-panel[hidden] { display: none; }
.mua-right #mua-panel { right: 0; }
.mua-left #mua-panel { left: 0; }

#mua-root .mua-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 12px 12px 18px; background: var(--mua-accent); color: #fff;
  border-radius: 13px 13px 0 0;
}
#mua-root .mua-title { margin: 0; font-size: 17px; font-weight: 700; color: #fff; }
#mua-root .mua-close { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
#mua-root .mua-close svg { width: 20px; height: 20px; }
#mua-root .mua-close:hover { background: rgba(255, 255, 255, .18); }
#mua-root .mua-close:focus-visible { outline-color: #fff; }

#mua-root .mua-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px; }
#mua-root .mua-tile {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  min-height: 92px; padding: 12px 8px;
  border: 2px solid var(--mua-line); border-radius: 10px; background: #fff;
  font-size: 14px; font-weight: 600; text-align: center;
}
#mua-root .mua-tile:hover { border-color: var(--mua-accent); }
#mua-root .mua-tile[aria-pressed="true"] { background: var(--mua-accent); border-color: var(--mua-accent); color: #fff; }
#mua-root .mua-icon svg { width: 26px; height: 26px; display: block; }
#mua-root .mua-dots { display: flex; gap: 4px; }
#mua-root .mua-dots i { width: 18px; height: 4px; border-radius: 2px; background: var(--mua-line); }
#mua-root .mua-tile[aria-pressed="true"] .mua-dots i { background: rgba(255, 255, 255, .35); }
#mua-root .mua-tile[aria-pressed="true"] .mua-dots i.on { background: #fff; }

#mua-root .mua-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px 16px; border-top: 1px solid var(--mua-line);
}
#mua-root .mua-reset { padding: 8px 14px; border: 2px solid var(--mua-ink); border-radius: 8px; font-weight: 600; font-size: 14px; }
#mua-root .mua-reset:hover { background: var(--mua-ink); color: #fff; }
#mua-root .mua-statement { color: var(--mua-accent); text-decoration: underline; font-size: 14px; }
#mua-root .mua-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (prefers-reduced-motion: no-preference) {
  #mua-panel { animation: mua-in .16s ease-out; }
}
@keyframes mua-in { from { opacity: 0; transform: translateY(6px); } }
@media print { #mua-root { display: none; } }

/* ---------- Page adjustments ---------- */
html.mua-spacing body *:not(#mua-root):not(#mua-root *) {
  letter-spacing: .12em !important; word-spacing: .16em !important; line-height: 1.5 !important;
}
html.mua-spacing body p:not(#mua-root *) { margin-bottom: 2em !important; }

html.mua-font body *:not(#mua-root):not(#mua-root *):not(i):not([class*="icon"]):not([class*="fa-"]):not([class*="dashicons"]) {
  font-family: Verdana, Tahoma, "Trebuchet MS", Arial, sans-serif !important;
}

html.mua-contrast body { background: #000 !important; color: #fff !important; }
html.mua-contrast body *:not(#mua-root):not(#mua-root *) {
  background-color: #000 !important; color: #fff !important; border-color: #fff !important;
  text-shadow: none !important; box-shadow: none !important;
}
html.mua-contrast body a:not(#mua-root *),
html.mua-contrast body a:not(#mua-root *) * { color: #ffe94d !important; text-decoration: underline !important; }

html.mua-links body a:not(#mua-root *) {
  background-color: #ffe94d !important; color: #000 !important;
  text-decoration: underline !important; text-underline-offset: 3px;
  outline: 2px solid #000 !important; outline-offset: 1px;
}
html.mua-links body a:not(#mua-root *) * { color: #000 !important; }

html.mua-gray { filter: grayscale(1); }

html.mua-motion *, html.mua-motion *::before, html.mua-motion *::after {
  animation-duration: .001ms !important; animation-iteration-count: 1 !important;
  transition-duration: .001ms !important; scroll-behavior: auto !important;
}

html.mua-cursor, html.mua-cursor * {
  cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='48' height='48' viewBox='0 0 48 48'%3E%3Cpath d='M6 4v36l10-10 7 15 6-3-7-15h14z' fill='%23000' stroke='%23fff' stroke-width='2.5' stroke-linejoin='round'/%3E%3C/svg%3E") 6 4, auto !important;
}
