:root {
  color-scheme: light;
  font-family: Inter, "Microsoft YaHei", system-ui, sans-serif;
  color: #24334b;
  background: #eef5ff;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 15% 10%, rgba(255,255,255,.95), transparent 38%),
    linear-gradient(145deg, #eef7ff, #dceaff 55%, #f4edff);
}

.shell {
  width: min(760px, 100%);
  margin: 0 auto;
  padding: max(24px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom));
}

header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  font-size: 22px;
  font-weight: 800;
  color: #31558c;
  background: linear-gradient(145deg, #fff, #a7cdff);
  box-shadow: 0 10px 28px rgba(57, 98, 158, .18);
}

h1, h2, p { margin: 0; }
h1 { font-size: 21px; }
h2 { font-size: 18px; margin-bottom: 8px; }
header p, .muted { margin-top: 3px; color: #70809a; font-size: 13px; }
.state { margin-left: auto; padding: 7px 10px; border-radius: 999px; background: #dbe9fa; color: #63748d; font-size: 12px; }
.state.ok { background: #dff6ea; color: #2c8054; }
.state.bad { background: #ffe5e9; color: #b44356; }

.panel {
  padding: 20px;
  border: 1px solid rgba(81, 111, 160, .18);
  border-radius: 24px;
  background: rgba(255,255,255,.76);
  box-shadow: 0 22px 60px rgba(50, 80, 130, .14);
  backdrop-filter: blur(18px);
}

label { display: block; margin-bottom: 10px; font-weight: 700; }
textarea {
  width: 100%;
  min-height: 210px;
  resize: vertical;
  padding: 16px;
  border: 1px solid #bed0e8;
  border-radius: 18px;
  outline: none;
  background: rgba(247, 251, 255, .9);
  color: #24334b;
  font: inherit;
  font-size: 18px;
  line-height: 1.65;
}
textarea:focus { border-color: #79adf1; box-shadow: 0 0 0 4px rgba(121,173,241,.16); }
.row { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; }
#count { color: #718099; font-size: 13px; }
button {
  appearance: none;
  border: 0;
  border-radius: 16px;
  padding: 13px 20px;
  background: linear-gradient(135deg, #70aafa, #9b8df7);
  color: white;
  font: inherit;
  font-weight: 750;
  box-shadow: 0 10px 25px rgba(82, 127, 210, .25);
}
button:disabled { opacity: .55; }
.result { min-height: 22px; margin-top: 12px; color: #2f8659; font-size: 14px; }
.result.error { color: #b44356; }

.addresses { display: grid; gap: 10px; margin-top: 18px; }
.address {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 15px;
  background: #edf5ff;
}
.address code { flex: 1; overflow-wrap: anywhere; color: #31558c; }
.address button { padding: 8px 12px; border-radius: 11px; font-size: 13px; }
.latest { margin-top: 24px; padding-top: 18px; border-top: 1px solid #dce6f3; }
.latest span { color: #718099; font-size: 13px; }
.latest strong { display: block; margin: 5px 0 10px; }
pre { margin: 0; padding: 14px; border-radius: 15px; background: #f2f7fd; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; line-height: 1.6; }

@media (max-width: 520px) {
  .shell { padding-inline: 12px; }
  .panel { padding: 16px; border-radius: 21px; }
  .row { align-items: stretch; flex-direction: column; }
  button { width: 100%; }
  .address { align-items: stretch; flex-direction: column; }
}
