:root {
  color-scheme: light dark;
  --bg: #f4f2fc;
  --card: #fff;
  --text: #1d1a33;
  --muted: #666380;
  --line: #e2dff2;
  --accent: #6d4ff0;
  --accent-text: #fff;
  --good: #1a8a4a;
  --bad: #c62f2f;
  --warn: #c98a12;
  --alert: #d92b2b;
}
@media (prefers-color-scheme: dark) {
:root {
    --bg: #07060e;
    --card: #211e44;
    --text: #f2f0fb;
    --muted: #a8a4c8;
    --line: #3b3670;
    --accent: #8668ff;
    --good: #4ade80;
    --bad: #ff8a8a;
    --warn: #f5c451;
    --alert: #f0443f;
  }
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  padding: 1rem;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", sans-serif;
}
main {
  position: relative;
  width: 100%;
  max-width: 30rem;
  padding: 2rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 12px 40px rgb(40 20 120 / 0.12);
}
.logo {
  display: block;
  width: 72px;
  height: 72px;
  border-radius: 18px;
}
.masthead {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}
.masthead h1 {
  margin: 0;
}
.masthead .lede {
  margin: 0.2rem 0 0;
  font-size: 0.9rem;
}
h1 {
  margin: 1rem 0 0.25rem;
  font-size: 1.75rem;
  line-height: 1.2;
}
.lede {
  margin: 0 0 1.5rem;
  color: var(--muted);
}
.button {
  display: inline-block;
  padding: 0.8rem 1.4rem;
  border: 0;
  border-radius: 12px;
  background: var(--accent);
  color: var(--accent-text);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.button:hover {
  filter: brightness(1.1);
}
.button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}
a {
  color: var(--accent);
}
.button[hidden] {
  display: none;
}
.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.85rem;
  text-decoration: underline;
  cursor: pointer;
}
.link-button[hidden] {
  display: none;
}
.foot-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.3rem 1.1rem;
  width: 100%;
  max-width: 44rem;
  padding: 0 0.5rem;
  font-size: 0.85rem;
}
.foot-links a,
.foot-links button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  text-decoration: none;
  cursor: pointer;
}
.foot-links a:hover,
.foot-links button:hover {
  color: var(--accent);
}
.foot-links [hidden] {
  display: none;
}
#contact-dialog {
  width: min(26rem, calc(100vw - 2rem));
  padding: 1rem 1.5rem 1.25rem;
}
.dialog-x {
  position: absolute;
  top: 0.45rem;
  right: 0.5rem;
  width: 2rem;
  height: 2rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.dialog-x:hover,
.dialog-x:focus-visible {
  color: var(--accent);
}
.contact {
  display: grid;
  gap: 0.6rem;
  padding: 0;
}
.contact textarea,
.contact input[type="email"] {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: transparent;
  color: var(--text);
  font: inherit;
}
.contact [name="botcheck"] {
  display: none;
}
.contact .button {
  cursor: pointer;
}
#contact-status {
  margin: 0;
}
#contact-status:empty {
  display: none;
}
body:has(dialog[open]) {
  overflow: hidden;
}
.footer {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0 1rem;
}
.footer p {
  margin-bottom: 0;
}
.footer #status:empty {
  display: none;
}
.kofi {
  width: 1.1em;
  height: 1.1em;
  margin-right: 0.35rem;
  fill: #e8372c;
  transition: fill 0.15s;
  vertical-align: -0.2em;
}
#coffee:hover .kofi {
  fill: var(--accent);
}
.note {
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: 0.875rem;
}
#status {
  margin-top: 1rem;
}
#status.good {
  color: var(--good);
  font-weight: 600;
}
#status.bad {
  color: var(--bad);
}
#status ol {
  padding-left: 1.25rem;
}
.addons {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: grid;
  
  grid-template-columns: minmax(0, 1fr);
  gap: 0.5rem;
}
.addons[hidden] {
  display: none;
}
.skeleton,
.returning #connect,
.returning #note {
  display: none;
}
.returning .skeleton {
  display: grid;
}
.skeleton li {
  cursor: default;
}
.skeleton .line {
  display: block;
  width: 60%;
  height: 0.8rem;
  margin: 0.3rem 0;
  border-radius: 6px;
  background: var(--line);
  animation: pulse 1.2s ease-in-out infinite;
}
.skeleton .line.short {
  width: 35%;
}
@keyframes pulse {
  50% {
    opacity: 0.4;
  }
}
@media (prefers-reduced-motion: reduce) {
.skeleton .line {
    animation: none;
  }
}
.addons li {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.1rem 0.75rem;
  padding: 0.55rem 0.7rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.addons li .logo-small,
.addons li strong {
  cursor: grab;
}
.addons li.dragging {
  opacity: 0.4;
}
.addons li {
  position: relative;
}
.addons li.drop-before::before,
.addons li.drop-after::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
  pointer-events: none;
}
.addons li.drop-before::before {
  top: -5px;
}
.addons li.drop-after::after {
  bottom: -5px;
}
.logo-small {
  display: inline-grid;
  place-items: center;
  color: var(--muted);
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--line);
  object-fit: cover;
}
.addons .name {
  flex: 1;
  min-width: 0;
  line-height: 1.2;
}
.addons .lists {
  margin-top: 0.15rem;
  font-size: 0.85rem;
  color: var(--muted);
}
.addons .lists .list .move {
  width: 1.5rem;
  height: 1.5rem;
  font-size: 0.7rem;
}
.addons .lists .entry {
  position: relative;
}
.addons .lists .entry[draggable="true"] {
  cursor: grab;
}
.addons .lists .entry.dragging {
  opacity: 0.4;
}
.addons .lists .entry.drop-before::before,
.addons .lists .entry.drop-after::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 3px;
  border-radius: 2px;
  background: var(--accent);
  pointer-events: none;
}
.addons .lists .entry.drop-before::before {
  top: -2px;
}
.addons .lists .entry.drop-after::after {
  bottom: -2px;
}
.addons .lists .preview {
  display: flex;
  gap: 0.25rem;
  margin-top: 0.3rem;
  overflow-x: auto;
}
.addons .lists .preview img {
  flex: none;
  width: 2.5rem;
  height: 3.75rem;
  object-fit: cover;
  border-radius: 0.25rem;
  background: var(--line);
}
.addons .lists .preview.faded img {
  opacity: 0.35;
  filter: grayscale(1);
}
.addons .lists .list label + .move {
  margin-left: auto;
}
.addons .lists .list {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  min-height: 1.5rem;
  margin-top: 0.3rem;
}
.addons .lists label {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  white-space: nowrap;
  cursor: pointer;
}
.addons .name strong,
.addons .name small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 480px) {
.addons li {
    gap: 0.35rem;
    padding: 0.5rem;
  }
.move {
    width: 1.6rem;
  }
}
.addons small {
  color: var(--muted);
}
.move {
  flex: none;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 0.8rem;
  cursor: pointer;
}
a.move {
  display: grid;
  place-items: center;
  text-decoration: none;
}
.move:hover:not(:disabled) {
  color: var(--accent);
  background: var(--line);
}
.move.remove:hover:not(:disabled) {
  color: var(--bad);
}
.move:disabled {
  opacity: 0.25;
  cursor: default;
}
.remove:hover:not(:disabled) {
  color: var(--bad);
}
.danger {
  background: #c62f2f;
  color: #fff;
}
dialog {
  width: min(22rem, calc(100vw - 2rem));
  padding: 0;
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 16px;
}
dialog::backdrop {
  background: rgb(0 0 0 / 0.6);
}
dialog form {
  position: relative;
  padding: 1.5rem;
}
dialog h2 {
  margin: 0 2rem 0.5rem 0;
  font-size: 1.15rem;
}
dialog p {
  margin: 0 0 1.25rem;
  color: var(--muted);
}
dialog .danger {
  width: 100%;
}
.close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
}
main.manage {
  max-width: 44rem;
  
  --edge: calc(1.395rem + 1px);
}
.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1.25rem;
  padding-right: var(--edge);
}
.toolbar:not(:has(> :not([hidden]))) {
  display: none;
}
.toolbar .tool {
  padding: 0.1rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}
.toolbar .tool:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.toolbar .tool[hidden] {
  display: none;
}
.toolbar .tool-check {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.85rem;
  cursor: pointer;
}
.toolbar .tool-check[hidden] {
  display: none;
}
.toolbar .link-button {
  margin-left: auto;
}
main.manage .footer {
  padding-right: var(--edge);
}
@media (max-width: 480px) {
body:has(> main.manage) {
    justify-content: flex-start;
    padding: 0.5rem;
  }
main.manage {
    padding: 0.9rem 0.65rem;
    border-radius: 16px;
    --edge: calc(1.195rem + 1px);
  }
.masthead {
    gap: 0.75rem;
    margin-bottom: 0.75rem;
  }
.masthead .logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }
.masthead h1 {
    font-size: 1.35rem;
  }
main.manage .addons {
    margin-top: 1.25rem;
    gap: 0.4rem;
  }
}
#connect {
  margin-top: 1.25rem;
}
.suggested {
  max-width: 44rem;
  margin: 1.25rem auto 0;
  padding: 0 1.25rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}
.suggested[hidden] {
  display: none;
}
.suggested h2 {
  margin: 0 0 0.35rem;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.75;
}
.suggested ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 1.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.suggested a {
  color: var(--muted);
  text-decoration: none;
  border-bottom: 1px dotted var(--line);
}
.suggested a:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.suggested li span {
  opacity: 0.7;
}
dialog .button {
  width: 100%;
}

.flag {
  display: inline-grid;
  place-items: center;
  width: 1.1rem;
  height: 1.1rem;
  margin-left: 0.45rem;
  border-radius: 50%;
  background: var(--warn);
  color: #1a1400;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  cursor: help;
}

.addons .sub {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.1rem;
}
.addons .count {
  color: var(--muted);
  font-size: 0.75rem;
  white-space: nowrap;
}

.addons .version {
  margin-left: 0.4rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 400;
}

.addons .lists {
  flex-basis: 100%;
}

.addons .lists .about {
  margin: 0 0 0.4rem;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.flag.silent,
.flag.warning {
  background: var(--alert);
  color: #fff;
}

.addons li.alarm {
  background: color-mix(in srgb, var(--alert) 14%, var(--bg));
  border-color: color-mix(in srgb, var(--alert) 55%, var(--line));
}

.addons .lists .problem {
  margin: 0 0 0.4rem;
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--warn);
}

.addons .lists .problem.silent,
.addons .lists .problem.warning {
  color: var(--alert);
}

.addons .kinds {
  display: inline-block;
  padding: 0 0.4rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 22%, transparent);
  color: var(--text);
  font-size: 0.7rem;
  font-weight: 600;
}
