:root {
  color-scheme: light;
  --bg: #f6f7f2;
  --ink: #1f2629;
  --muted: #5e6871;
  --line: #d9ded7;
  --panel: #ffffff;
  --accent: #11675a;
  --accent-ink: #ffffff;
  --warn: #9a4d13;
  --bad: #9d2635;
  --ok: #23704c;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px clamp(18px, 5vw, 56px);
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h2 {
  font-size: 1rem;
  letter-spacing: 0;
}

.topbar p {
  margin-top: 8px;
  max-width: 720px;
  color: var(--muted);
}

.install-link,
button {
  min-height: 40px;
  border: 0;
  border-radius: 7px;
  padding: 0 16px;
  background: var(--accent);
  color: var(--accent-ink);
  font: inherit;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

button.secondary {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
  gap: 18px;
  padding: 22px clamp(18px, 5vw, 56px) 42px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.settings-panel {
  grid-row: span 2;
}

label {
  display: grid;
  gap: 7px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
}

.check-row input {
  width: 18px;
  min-height: 18px;
}

input,
select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0 12px;
  color: var(--ink);
  background: #ffffff;
  font: inherit;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.addon-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.addon-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.addon-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
}

.addon-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.addon-title strong {
  overflow-wrap: anywhere;
}

.addon-url {
  color: var(--muted);
  font-size: 0.85rem;
  overflow-wrap: anywhere;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.badge {
  border-radius: 999px;
  background: #e7efeb;
  color: #164f45;
  padding: 4px 9px;
  font-size: 0.78rem;
  font-weight: 700;
}

.status {
  min-height: 20px;
  color: var(--muted);
  font-size: 0.88rem;
}

.status.error {
  color: var(--bad);
}

.status.ok {
  color: var(--ok);
}

.results {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.result {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 54px;
}

.result img {
  width: 44px;
  height: 54px;
  object-fit: cover;
  border-radius: 5px;
  background: #e6e9e2;
}

.result strong,
.result span {
  display: block;
  overflow-wrap: anywhere;
}

.result span {
  color: var(--muted);
  font-size: 0.86rem;
}

.url-row {
  display: grid;
  gap: 6px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.url-row:first-of-type {
  margin-top: 12px;
}

code {
  overflow-wrap: anywhere;
  color: var(--accent);
}

@media (max-width: 850px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .layout,
  .field-grid {
    grid-template-columns: 1fr;
  }

  .settings-panel {
    grid-row: auto;
  }
}
