:root {
  color-scheme: light dark;
  --bg: #f4f2fc;
  --card: #fff;
  --text: #1d1a33;
  --muted: #666380;
  --line: #e2dff2;
  --accent: #6d4ff0;
  --accent-text: #fff;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0e0c1b;
    --card: #181530;
    --text: #f2f0fb;
    --muted: #a09cc0;
    --line: #2b2750;
    --accent: #8668ff;
  }
}

* {
  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 {
  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;
}

h1 {
  margin: 1rem 0 0.25rem;
  font-size: 1.75rem;
  line-height: 1.2;
}

.lede {
  margin: 0 0 1.5rem;
  color: var(--muted);
}

.steps {
  margin: 0 0 1.75rem;
  padding-left: 1.25rem;
}

.steps li {
  margin: 0.5rem 0;
}

.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;
}

.secondary {
  background: transparent;
  color: var(--accent);
  box-shadow: inset 0 0 0 2px var(--accent);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.actions .button {
  flex: 1;
  min-width: 10rem;
  text-align: center;
}

.button:hover {
  filter: brightness(1.1);
}

.button:focus-visible,
a:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

a {
  color: var(--accent);
}

code {
  display: block;
  margin: 0.5rem 0 1rem;
  padding: 0.7rem 0.85rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.85rem;
  word-break: break-all;
  user-select: all;
}

.also {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin: 1.5rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
  line-height: 1.35;
  text-decoration: none;
}

.button[hidden],
.also[hidden] {
  display: none;
}

.coffee {
  margin: 1.25rem 0 0;
}

.coffee a {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
}

.coffee a:hover {
  color: var(--accent);
}

.coffee[hidden] {
  display: none;
}

.kofi {
  width: 1.2em;
  height: 1.2em;
  fill: #ff5e5b;
  vertical-align: -0.25em;
}

.also img {
  border-radius: 10px;
}

.also strong {
  color: var(--text);
}

.also:hover strong {
  color: var(--accent);
}

.inspired {
  width: 100%;
  max-width: 30rem;
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
}

.note {
  margin: 1.5rem 0 0;
  color: var(--muted);
  font-size: 0.875rem;
}

#status {
  margin-top: 1rem;
}

#status ol {
  padding-left: 1.25rem;
}

.addons {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.addons[hidden] {
  display: none;
}

.addons li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.7rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  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: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--line);
  object-fit: cover;
}

.addons .name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.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;
}

.move:hover:not(:disabled) {
  color: var(--accent);
  background: var(--line);
}

.move:disabled {
  opacity: 0.25;
  cursor: default;
}

.coffee[hidden],
.also[hidden] {
  display: none;
}
