:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #18231e;
  background: #f4f7f4;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  --muted: #748179;
  --line: #e5ebe6;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; }
button, a { font: inherit; }
button:focus-visible, a:focus-visible { outline: 3px solid #80b7a1; outline-offset: 3px; }
.shell { width: min(100% - 40px, 1024px); margin: 0 auto; }
.topbar { height: 76px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #dde5de; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-size: 15px; font-weight: 700; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: #234d3b; color: white; font-size: 12px; letter-spacing: 0; }
.live-state { display: inline-flex; align-items: center; gap: 8px; color: #65736b; font-size: 13px; }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #29a56d; box-shadow: 0 0 0 3px #d9eee3; }
.intro { display: flex; align-items: flex-end; justify-content: space-between; padding: 46px 0 22px; }
.eyebrow { margin: 0 0 10px; color: #728077; font-size: 11px; font-weight: 700; letter-spacing: 1.2px; }
h1 { margin: 0; font-size: 30px; line-height: 1.25; letter-spacing: 0; }
.intro-copy { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.refresh-button, .copy-button, .open-link { flex: 0 0 auto; display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid #dce5de; border-radius: 8px; background: #fff; color: #52635a; cursor: pointer; transition: background .15s ease, color .15s ease, border-color .15s ease; }
.refresh-button:hover, .copy-button:not(:disabled):hover, .open-link.ready:hover { border-color: #9ab8a5; background: #edf5ef; color: #24553d; }
.refresh-button:disabled { cursor: wait; }
svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.services { overflow: hidden; border: 1px solid #e0e7e1; border-radius: 8px; background: #fff; }
.service-row { min-height: 106px; display: grid; grid-template-columns: 48px minmax(180px, 1fr) minmax(132px, 190px) 40px; align-items: center; gap: 16px; padding: 18px 22px; }
.service-row + .service-row { border-top: 1px solid var(--line); }
.service-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 8px; }
.service-icon svg { width: 22px; height: 22px; }
.icon-green { background: #e8f4ec; color: #357551; }
.icon-orange { background: #fff0e7; color: #c36732; }
.icon-blue { background: #e8f1fb; color: #4776aa; }
.icon-purple { background: #f0ebf7; color: #775a9b; }
.service-info h2 { margin: 0; font-size: 15px; line-height: 1.4; font-weight: 650; }
.service-info p { margin: 2px 0 5px; color: var(--muted); font-size: 12px; }
.service-host { color: #65746b; font-size: 12px; overflow-wrap: anywhere; }
.service-status { display: inline-flex; align-items: center; gap: 8px; color: #748179; font-size: 12px; justify-self: start; }
.service-status.ready { color: #287148; }
.service-status.unavailable { color: #a45d44; }
.spinner { width: 13px; height: 13px; border: 1.5px solid #cbd6ce; border-top-color: #428462; border-radius: 50%; animation: spin .8s linear infinite; }
.open-link, .copy-button { color: #9aa69e; }
.open-link[aria-disabled="true"] { cursor: not-allowed; }
.open-link.ready { color: #376e4e; }
.vpn-endpoint { min-width: 0; display: inline-flex; align-items: center; gap: 8px; color: #303c35; font-size: 13px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.vpn-endpoint.unavailable { color: #a45d44; }
.copy-button:disabled { cursor: not-allowed; background: #f8faf8; }
footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; padding: 19px 2px 32px; color: #859189; font-size: 11px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 12px); opacity: 0; pointer-events: none; padding: 10px 15px; border-radius: 6px; background: #1f3328; color: #fff; font-size: 13px; transition: opacity .18s ease, transform .18s ease; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
.spinning svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 650px) {
  .shell { width: min(100% - 28px, 520px); }
  .topbar { height: 62px; }
  .intro { padding: 34px 0 18px; }
  h1 { font-size: 25px; }
  .service-row { min-height: 98px; grid-template-columns: 40px minmax(0, 1fr) 36px; gap: 12px; padding: 15px 13px; }
  .service-icon { width: 40px; height: 40px; }
  .service-status { grid-column: 2; grid-row: 2; margin-top: -16px; }
  .service-info { grid-column: 2; grid-row: 1; padding-bottom: 17px; }
  .service-icon { grid-column: 1; grid-row: 1 / span 2; align-self: center; }
  .open-link, .copy-button { grid-column: 3; grid-row: 1 / span 2; }
  .vpn-endpoint { grid-column: 2; grid-row: 2; align-self: end; margin-top: -17px; font-size: 12px; }
  .vpn-row .service-info { padding-bottom: 17px; }
  footer { display: grid; grid-template-columns: 1fr auto; }
  footer span:last-child { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
