* { box-sizing: border-box; }
:root { color-scheme: light; --green: #087a43; --green-dark: #056334; --ink: #173126; --muted: #63756b; --line: #e0e9e3; --soft: #f3f8f5; }
body { margin: 0; background: #f4f7f5; color: var(--ink); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif; }
.app { width: min(100% - 28px, 560px); margin: 0 auto; padding: max(20px, env(safe-area-inset-top)) 0 max(24px, env(safe-area-inset-bottom)); }
.brand { display: flex; align-items: center; gap: 12px; padding: 10px 2px 24px; }
.brand-mark { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; background: var(--green); color: white; font-weight: 800; font-size: 25px; }
.brand-name { font-weight: 800; font-size: 22px; letter-spacing: -.5px; }
.brand-subtitle { color: var(--muted); font-size: 13px; margin-top: 2px; }
.intro { text-align: center; padding: 24px 12px 18px; }
.wifi-icon { margin: 0 auto 8px; display: grid; place-items: center; width: 54px; height: 54px; border-radius: 18px; background: #e1f3e8; color: var(--green); font-size: 42px; line-height: 1; transform: rotate(90deg); }
h1 { margin: 8px 0; font-size: clamp(24px, 6vw, 30px); letter-spacing: -.7px; }
.intro p { color: var(--muted); line-height: 1.5; font-size: 14px; max-width: 340px; margin: 0 auto; }
.summary { margin: 8px 0 18px; padding: 20px; text-align: center; background: white; border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 5px 18px #143c2410; }
.count { color: var(--green); font-size: 48px; line-height: 1.1; font-weight: 800; font-variant-numeric: tabular-nums; }
.summary-label { color: var(--muted); margin-top: 6px; font-size: 14px; }
button { width: 100%; border: 0; border-radius: 14px; padding: 16px 18px; background: var(--green); color: #fff; font-size: 16px; font-weight: 750; box-shadow: 0 4px 0 var(--green-dark); cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:active { transform: translateY(1px); box-shadow: 0 3px 0 var(--green-dark); }
button:disabled { opacity: .65; cursor: wait; }
.status { min-height: 40px; text-align: center; color: var(--muted); font-size: 13px; line-height: 1.45; padding: 6px 8px 0; }
.results { margin-top: 16px; padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.results-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
h2 { font-size: 16px; margin: 0; }
.tag { font-size: 11px; color: var(--green); background: #e7f5ec; border-radius: 999px; padding: 5px 8px; white-space: nowrap; }
.ip-list { margin: 0; padding: 0; list-style: none; }
.ip-item { display: flex; align-items: center; gap: 10px; min-height: 48px; border-bottom: 1px solid #edf2ee; }
.ip-item:last-child { border-bottom: 0; }
.dot { width: 9px; height: 9px; flex: 0 0 9px; border-radius: 50%; background: #16a05a; box-shadow: 0 0 0 4px #e8f7ee; }
.ip-address { flex: 1; font: 600 15px ui-monospace, SFMono-Regular, Menlo, monospace; }
.ip-state { font-size: 12px; color: var(--green); background: #eef8f1; border-radius: 7px; padding: 4px 7px; }
.empty { color: var(--muted); font-size: 13px; line-height: 1.5; padding: 10px 0; list-style: none; }
.notice { margin: 16px 4px 22px; color: #65756c; font-size: 12px; line-height: 1.55; }
footer { display: flex; flex-direction: column; gap: 5px; text-align: center; color: #819087; font-size: 11px; padding: 14px 0; }
.credit { font-size: 10px; }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }


/* Mobile-first scan animation */
.scan-animation { text-align: center; padding: 18px 12px 24px; }
.scan-animation[hidden] { display: none !important; }
.radar { width: 112px; height: 112px; margin: 0 auto 14px; border-radius: 50%; position: relative;
  border: 2px solid rgba(8,122,67,.28);
  background: repeating-radial-gradient(circle, rgba(8,122,67,.08) 0 2px, transparent 3px 22px);
  overflow: hidden; }
.radar::before { content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 72%, rgba(8,122,67,.42) 100%);
  animation: radar-spin 1.8s linear infinite; }
.radar::after { content: ""; position: absolute; width: 8px; height: 8px; border-radius: 50%;
  background: #087a43; left: 66%; top: 28%; box-shadow: -30px 34px 0 #087a43, 17px 45px 0 #087a43; }
.radar-dot { position: absolute; width: 100%; height: 2px; top: 50%; left: 0;
  background: rgba(8,122,67,.45); z-index: 1; }
.scan-animation-title { font-weight: 700; margin: 8px 0 4px; }
.scan-animation-subtitle { color: #6b7771; font-size: .92rem; margin: 0; }
@keyframes radar-spin { to { transform: rotate(360deg); } }
.ip-item { display: flex; align-items: center; gap: 10px; }
.ip-address { font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.ip-state { margin-left: auto; white-space: nowrap; }
@media (max-width: 600px) {
  .app { width: min(100% - 24px, 560px); padding-top: max(18px, env(safe-area-inset-top)); }
  #scan-button { min-height: 56px; font-size: 1.08rem; border-radius: 16px; touch-action: manipulation; }
  .summary { padding: 20px 14px; }
  .count { font-size: 2.8rem; }
  .results { padding: 16px 14px; }
  .ip-item { min-height: 48px; }
}

/* ToroNet branding */
.toronet-logo {
  display: block;
  width: min(100%, 440px);
  height: auto;
  object-fit: contain;
  margin: 0 auto 18px;
}
.credit { display: none !important; }
