:root {
  color-scheme: light;
  --bg: #f4f7f4;
  --panel: #ffffff;
  --text: #1f2a22;
  --muted: #68746d;
  --line: #e4e9e5;
  --green: #43a047;
  --green-dark: #2f7d32;
  --red: #d84545;
  --orange: #d9822b;
  --shadow: 0 16px 48px rgba(24, 44, 27, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(67, 160, 71, 0.12), transparent 34%),
    linear-gradient(180deg, #fbfdfb 0%, var(--bg) 100%);
  color: var(--text);
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei",
    "PingFang SC", Arial, sans-serif;
}

.shell {
  width: min(100%, 520px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 24px 14px;
  display: flex;
  align-items: center;
}

.panel {
  width: 100%;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 22px 24px 18px;
}

.brand-mark {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #e9f6ea;
  color: var(--green-dark);
  font-size: 22px;
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}

p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.progress {
  height: 3px;
  background: #edf2ee;
}

.progress span {
  display: block;
  width: 8%;
  height: 100%;
  background: var(--green);
  transition: width 240ms ease;
}

.domain-list {
  border-top: 1px solid var(--line);
}

.domain-card {
  width: 100%;
  min-height: 72px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 24px;
  color: inherit;
  text-decoration: none;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.domain-card:focus-visible {
  outline: 3px solid rgba(67, 160, 71, 0.28);
  outline-offset: -3px;
}

.domain-image,
.domain-fallback {
  width: 48px;
  height: 48px;
  border-radius: 8px;
}

.domain-image {
  object-fit: cover;
  background: #eef4ef;
}

.domain-fallback {
  display: grid;
  place-items: center;
  background: #eef7ef;
  color: var(--green-dark);
  font-weight: 700;
}

.domain-name {
  min-width: 0;
  color: var(--green);
  font-size: clamp(18px, 5vw, 25px);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.domain-state {
  min-width: 62px;
  text-align: right;
  color: var(--muted);
  font-size: 13px;
}

.domain-card.is-checking .domain-state {
  color: var(--orange);
}

.domain-card.is-online .domain-state {
  color: var(--green-dark);
}

.domain-card.is-offline .domain-state {
  color: var(--red);
}

.actions {
  display: flex;
  gap: 10px;
  padding: 16px 24px 22px;
}

button {
  min-height: 42px;
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font-size: 15px;
  cursor: pointer;
}

button:first-child {
  border-color: var(--green);
  background: var(--green);
  color: #fff;
}

button:active {
  transform: translateY(1px);
}

@media (max-width: 420px) {
  .shell {
    padding: 0;
    align-items: stretch;
  }

  .panel {
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .brand,
  .domain-card,
  .actions {
    padding-left: 18px;
    padding-right: 18px;
  }

  .domain-card {
    grid-template-columns: 44px minmax(0, 1fr) auto;
    min-height: 72px;
  }

  .domain-image,
  .domain-fallback {
    width: 42px;
    height: 42px;
  }
}
