:root {
  color-scheme: light;
  --ink: #1b2119;
  --muted: rgba(27, 33, 25, 0.62);
  --line: rgba(27, 33, 25, 0.13);
  --surface: rgba(255, 255, 255, 0.78);
  --accent: #cde271;
  --accent-strong: #9dbb32;
  --danger: #c75142;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 12% 0%, rgba(205, 226, 113, 0.32), transparent 34rem),
    #f5f6ef;
  color: var(--ink);
  font: 14px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "PingFang SC", "Noto Sans CJK SC", sans-serif;
}

button,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.pairing-shell {
  width: min(720px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px clamp(18px, 5vw, 54px) 24px;
}

.pairing-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding-bottom: 54px;
}

.pairing-header strong {
  font-size: 18px;
  letter-spacing: -0.03em;
}

.pairing-header span,
.eyebrow,
footer,
.intro,
.notice,
.error {
  color: var(--muted);
}

.pairing-header span,
.eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.pairing-panel {
  padding: clamp(24px, 5vw, 48px);
  border: 1px solid var(--line);
  border-radius: 26px;
  background: var(--surface);
  box-shadow: 0 22px 70px rgba(27, 33, 25, 0.08);
  backdrop-filter: blur(18px);
}

h1 {
  margin: 12px 0 10px;
  font-size: clamp(40px, 7vw, 64px);
  line-height: 0.98;
  letter-spacing: -0.07em;
}

.intro {
  max-width: 430px;
  margin: 0 0 34px;
}

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

.section-heading span {
  display: grid;
  min-width: 26px;
  height: 26px;
  place-items: center;
  padding: 0 7px;
  border-radius: 99px;
  background: rgba(205, 226, 113, 0.36);
  font-size: 12px;
  font-weight: 800;
}

.hosts {
  display: grid;
  gap: 8px;
}

.empty {
  padding: 20px 0;
  color: var(--muted);
}

.host-row {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto 30px;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.48);
  text-align: left;
}

.host-row:hover {
  border-color: rgba(157, 187, 50, 0.7);
  background: #fff;
}

.host-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  background: rgba(205, 226, 113, 0.36);
  font-size: 20px;
}

.host-name {
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.host-status {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.host-row[data-status="online"] .host-status {
  color: #63800b;
}

.host-row[data-status="offline"] .host-status {
  color: var(--danger);
}

.host-connect {
  min-width: 62px;
  padding: 8px 11px;
  border: 0;
  border-radius: 999px;
  background: var(--accent);
  color: var(--ink);
  font-weight: 800;
}

.host-connect:disabled {
  cursor: default;
  opacity: 0.55;
}

.host-remove {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
}

.add-button {
  width: 100%;
  margin-top: 16px;
  padding: 11px;
  border: 1px dashed rgba(27, 33, 25, 0.28);
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  font-weight: 750;
}

.manual {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.manual summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.manual form {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

textarea {
  width: 100%;
  resize: vertical;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink);
}

.manual button {
  padding: 10px 14px;
  border: 0;
  border-radius: 11px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
}

.notice,
.error {
  min-height: 20px;
  margin: 14px 0 0;
  font-size: 12px;
}

.error {
  color: var(--danger);
}

footer {
  padding-top: 18px;
  font-size: 11px;
  text-align: center;
}

@media (max-width: 560px) {
  .pairing-header {
    padding-bottom: 30px;
  }

  .pairing-panel {
    border-radius: 20px;
  }

  .host-row {
    grid-template-columns: 36px minmax(0, 1fr) auto;
  }

  .host-icon {
    width: 36px;
    height: 36px;
  }

  .host-remove {
    display: none;
  }
}
