:root {
  color-scheme: light;
  --bg: #edf4f4;
  --card: #ffffff;
  --ink: #14212b;
  --muted: #687988;
  --line: #d8e4e7;
  --soft: #eef7f5;
  --accent: #0d867b;
  --accent-dark: #096c64;
  --danger: #b85058;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}

button,
input {
  font: inherit;
}

button {
  min-height: 50px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

button:hover:not(:disabled) {
  background: var(--accent-dark);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

input {
  width: 100%;
  height: 54px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 14px;
  background: #fff;
  color: var(--ink);
  font-size: 18px;
  outline: none;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(13, 134, 123, 0.12);
}

label {
  display: block;
  margin: 15px 0 8px;
  color: var(--muted);
  font-size: 14px;
}

.shell {
  width: min(980px, calc(100% - 28px));
  margin: 0 auto;
  padding: 22px 0 40px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand img {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 10px 24px rgba(219, 126, 143, 0.24);
}

.brand span,
.card-head span {
  display: block;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(34px, 8vw, 54px);
  line-height: 1;
}

h2 {
  margin-top: 4px;
  font-size: 24px;
}

.connect {
  min-width: 132px;
  padding: 0 18px;
}

.quick {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.quick div,
.data-list div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.86);
  padding: 12px;
}

.quick span,
.data-list span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.quick b,
.data-list b {
  display: block;
  overflow: hidden;
  margin-top: 6px;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tabs {
  position: sticky;
  top: 0;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 8px 0;
  background: var(--bg);
}

.tabs a {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #bcd8d5;
  border-radius: 999px;
  background: #fff;
  color: var(--accent);
  font-weight: 800;
  text-decoration: none;
}

.stack {
  display: grid;
  gap: 12px;
}

.card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  padding: 18px;
  box-shadow: 0 16px 34px rgba(33, 63, 70, 0.08);
}

.action-card p {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.55;
}

.input-line {
  display: grid;
  grid-template-columns: 1fr 92px;
  gap: 8px;
}

.two-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
}

.light {
  border: 1px solid #bddbd8;
  background: var(--soft);
  color: var(--accent);
}

.light:hover:not(:disabled) {
  background: #dff0ed;
}

.wide {
  width: 100%;
  margin-top: 14px;
}

.data-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.card-head.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.ghost {
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
}

.log {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
  margin-top: 12px;
}

.log-row,
.empty {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fbfb;
  padding: 10px 12px;
  color: var(--muted);
}

.log-row {
  display: grid;
  grid-template-columns: 84px 118px 1fr;
  gap: 8px;
  align-items: center;
}

.log-row b {
  color: var(--accent);
}

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

.log-row small {
  word-break: break-all;
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 20px, 460px);
    padding-top: 14px;
  }

  .topbar {
    align-items: stretch;
    flex-direction: column;
  }

  .connect {
    width: 100%;
  }

  .brand img {
    width: 58px;
    height: 58px;
  }

  .quick {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .data-list {
    grid-template-columns: 1fr;
  }

  .two-buttons,
  .input-line {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 16px;
  }

  .log-row {
    grid-template-columns: 1fr;
  }
}
