:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
  color: #173b37;
  background: #eef5f1;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}
* { box-sizing: border-box; }
body { min-height: 100vh; margin: 0; background: #eef5f1; }
.topbar { height: 70px; display: flex; align-items: center; justify-content: flex-end; padding: 0 32px; }
.settings,.close { display: grid; place-items: center; border: 0; background: transparent; color: #607b74; cursor: pointer; }
.settings { width: 40px; height: 40px; border-radius: 50%; }
.settings:hover { background: #e2eee8; }
.settings svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.55; stroke-linecap: round; stroke-linejoin: round; }
.results { width: min(1120px, calc(100% - 40px)); margin: 12px auto 60px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 330px), 1fr)); gap: 18px; }
.result-card { min-height: 196px; padding: 23px 26px; display: flex; flex-direction: column; justify-content: space-between; background: #fff; border: 1px solid #e0e9e4; border-radius: 16px; box-shadow: 0 2px 10px #33554b08; }
.group-name { font-size: 15px; font-weight: 650; letter-spacing: .01em; color: #385b53; overflow-wrap: anywhere; }
.result-status { display: flex; align-items: center; gap: 11px; font-size: clamp(28px, 4vw, 38px); line-height: 1.1; font-weight: 720; letter-spacing: .01em; }
.result-status::before { content: ""; width: 10px; height: 10px; flex: 0 0 auto; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 5px color-mix(in srgb, currentColor 12%, transparent); }
.result-card.ok .result-status { color: #149953; }
.result-card.down .result-status { color: #d35555; }
.veil { position: fixed; inset: 0; z-index: 5; display: grid; place-items: center; padding: 20px; background: #122c2580; backdrop-filter: blur(3px); }
.veil[hidden], [hidden] { display: none !important; }
.panel { position: relative; width: min(100%, 520px); max-height: min(88vh, 900px); overflow: auto; padding: 30px; border: 1px solid #e1ebe6; border-radius: 18px; background: #fff; box-shadow: 0 22px 70px #10261f26; }
.panel h1 { margin: 0 0 22px; font-size: 20px; font-weight: 680; }
.close { position: absolute; top: 18px; right: 18px; width: 32px; height: 32px; font-size: 26px; line-height: 1; }
.form,.group-fields { display: grid; gap: 14px; }
label { display: grid; gap: 7px; color: #59766d; font-size: 13px; }
input { width: 100%; height: 42px; padding: 0 12px; border: 1px solid #d6e2dc; border-radius: 9px; outline: none; background: #fbfdfc; color: #183c35; font: inherit; }
input:focus { border-color: #56a886; box-shadow: 0 0 0 3px #56a8861c; }
button { font: inherit; }
.primary,.quiet { min-height: 40px; padding: 0 15px; border: 1px solid transparent; border-radius: 9px; cursor: pointer; font-size: 13px; font-weight: 650; }
.primary { color: white; background: #178c59; }
.primary:hover { background: #117a4d; }
.quiet { color: #42655b; background: #f2f7f4; border-color: #e1ebe5; }
.quiet:hover { background: #eaf2ed; }
.message { min-height: 18px; margin: 0; color: #bd4a4a; font-size: 13px; }
.group-editor { display: grid; gap: 12px; }
.group-entry { padding: 16px; border: 1px solid #e1ebe5; border-radius: 12px; background: #fbfdfc; }
.group-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.group-head strong { font-size: 14px; }
.remove-group { padding: 5px 8px; border: 0; background: transparent; color: #bd5555; cursor: pointer; font-size: 12px; }
.group-state { margin: 10px 0 0; color: #738b83; font-size: 12px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.actions .primary { margin-left: auto; }
@media (max-width: 560px) {
  .topbar { height: 60px; padding: 0 15px; }
  .results { width: calc(100% - 24px); margin-top: 4px; gap: 12px; }
  .result-card { min-height: 160px; padding: 20px; }
  .panel { padding: 26px 18px 20px; }
}
