:root {
  color-scheme: light;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  color: #111;
  background: #edf1f5;
  font-synthesis: none;
  -webkit-text-size-adjust: 100%;
  --primary: #646ae3;
  --text-strong: #111318;
  --text-muted: #71757d;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-width: 240px;
  min-height: 100%;
  margin: 0;
}

body.guide-open {
  overflow: hidden;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

.wifi-page {
  --page-width: min(100vw, 430px);
  --u: calc(var(--page-width) / 375);
  position: relative;
  width: var(--page-width);
  height: max(100svh, calc(777 * var(--u)));
  min-height: calc(777 * var(--u));
  margin-inline: auto;
  overflow: hidden;
  background: #fff;
}

.page-header {
  position: absolute;
  top: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: calc(48 * var(--u));
  background: #fff;
}

.page-header h1 {
  margin: 0;
  color: #111;
  font-size: calc(18 * var(--u));
  font-weight: 600;
  line-height: calc(25 * var(--u));
  white-space: nowrap;
}

.connected-hero > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
}

.connected-hero {
  position: absolute;
  top: calc(48 * var(--u));
  left: 0;
  width: 100%;
  height: calc(300 * var(--u));
  overflow: hidden;
}

.recommendations {
  position: absolute;
  top: calc(372 * var(--u));
  left: calc(16 * var(--u));
  width: calc(343 * var(--u));
}

.recommendations h1 {
  height: calc(25 * var(--u));
  margin: 0;
  font-size: calc(18 * var(--u));
  font-weight: 600;
  line-height: calc(25 * var(--u));
  white-space: nowrap;
}

.section-mark {
  display: flex;
  align-items: center;
  gap: calc(2 * var(--u));
  height: calc(4 * var(--u));
  margin-top: calc(1 * var(--u));
}

.section-mark span {
  width: calc(18 * var(--u));
  height: calc(4 * var(--u));
  background: #646ae3;
  border-radius: calc(8 * var(--u));
}

.section-mark i {
  width: calc(4 * var(--u));
  height: calc(4 * var(--u));
  background: #646ae3;
  border-radius: 50%;
}

.software-carousel {
  width: 100%;
  margin-top: calc(12 * var(--u));
  overflow: hidden;
}

.software-list {
  display: flex;
  width: 100%;
  height: auto;
  margin: 0;
  padding: 0;
}

.software-card {
  display: flex;
  flex: 0 0 calc(80 * var(--u));
  flex-direction: column;
  align-items: center;
  width: calc(80 * var(--u));
  min-width: 0;
  padding: calc(12 * var(--u)) calc(7 * var(--u));
  color: inherit;
  text-decoration: none;
  background: #faf9f9;
  border-radius: calc(6 * var(--u));
}

.software-logo {
  display: grid;
  place-items: center;
  width: calc(48 * var(--u));
  height: calc(48 * var(--u));
  overflow: hidden;
  background: rgb(255 127 127 / 60%);
  border-radius: calc(8 * var(--u));
}

.software-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.software-name,
.software-description {
  width: 100%;
  margin: 0;
  overflow: hidden;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.software-name {
  margin-top: calc(6 * var(--u));
  font-size: calc(13 * var(--u));
  font-weight: 600;
  line-height: calc(18 * var(--u));
}

.software-description {
  margin-top: calc(1 * var(--u));
  color: #666;
  font-size: calc(11 * var(--u));
  font-weight: 500;
  line-height: calc(15 * var(--u));
}

.carousel {
  position: absolute;
  top: calc(550 * var(--u));
  left: calc(16 * var(--u));
  width: calc(343 * var(--u));
  height: calc(120 * var(--u));
  overflow: hidden;
  background: #faf9f9;
  border-radius: calc(12 * var(--u));
  touch-action: pan-y;
  user-select: none;
}

.carousel-track {
  position: absolute;
  inset: 0;
  display: flex;
  width: 100%;
  height: 100%;
  will-change: transform;
  transition: transform 360ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.carousel-slide {
  display: block;
  position: relative;
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.carousel-slide img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
}

.carousel-dots {
  position: absolute;
  z-index: 2;
  bottom: calc(6 * var(--u));
  left: 50%;
  display: flex;
  align-items: center;
  gap: calc(2 * var(--u));
  transform: translateX(-50%);
}

.carousel-dot {
  width: calc(3 * var(--u));
  height: calc(3 * var(--u));
  padding: 0;
  border: 0;
  border-radius: calc(8 * var(--u));
  background: #bbb;
  cursor: pointer;
  transition: width 180ms ease, background 180ms ease;
}

.carousel-dot.is-active {
  width: calc(9 * var(--u));
  background: #646ae3;
}

.site-address {
  position: absolute;
  top: calc(741 * var(--u));
  left: 0;
  width: 100%;
  margin: 0;
  color: #b7b7b7;
  font-family: Helvetica, Arial, sans-serif;
  font-size: calc(13 * var(--u));
  font-weight: 400;
  line-height: calc(16 * var(--u));
  text-align: center;
  white-space: nowrap;
}

.load-error {
  position: absolute;
  z-index: 4;
  right: calc(16 * var(--u));
  bottom: calc(50 * var(--u));
  left: calc(16 * var(--u));
  margin: 0;
  padding: calc(8 * var(--u));
  color: #9e3038;
  font-size: calc(11 * var(--u));
  line-height: 1.45;
  text-align: center;
  background: rgb(255 240 241 / 92%);
  border-radius: calc(6 * var(--u));
}

.browser-guide {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: max(16px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  border: 0;
  color: var(--text-strong);
  background: transparent;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.browser-guide::backdrop {
  background: rgb(8 18 38 / 78%);
}

.browser-guide-shell {
  width: min(100%, 360px);
  margin-left: auto;
}

.browser-guide-pointer {
  display: flex;
  justify-content: flex-end;
  padding: 0 12px 12px 0;
}

.browser-guide-pointer img {
  display: block;
  width: 59.1514px;
  height: 80.7092px;
  object-fit: contain;
}

.browser-guide-panel {
  padding: 24px;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 16px 48px rgb(0 0 0 / 20%);
}

.browser-guide-panel h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
  line-height: 30px;
}

.browser-guide-description {
  margin: 10px 0 0;
  color: #59616e;
  font-size: 14px;
  line-height: 22px;
}

.browser-guide-steps {
  margin: 20px 0;
  padding-left: 22px;
  color: #34373d;
  font-size: 14px;
  line-height: 24px;
}

.browser-guide-steps li + li {
  margin-top: 10px;
}

.browser-guide-steps li::marker {
  color: var(--primary);
  font-weight: 700;
}

.browser-guide-alternative {
  margin: 0 0 16px;
  color: #59616e;
  font-size: 13px;
  line-height: 21px;
}

.browser-guide-label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 18px;
}

.browser-guide-url {
  display: block;
  width: 100%;
  padding: 10px;
  color: #34373d;
  font: inherit;
  font-size: 16px;
  line-height: 22px;
  background: #f6f8fc;
  border: 1px solid #dfe5ee;
  border-radius: 10px;
  resize: none;
  overflow-wrap: anywhere;
  user-select: text;
  -webkit-user-select: text;
}

.browser-guide-url:focus-visible {
  outline: 2px solid #85bcff;
  outline-offset: 2px;
}

.browser-guide-copy-status {
  margin: 10px 0 0;
  color: #59616e;
  font-size: 12px;
  line-height: 20px;
}

.browser-guide-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.browser-guide-actions button {
  flex: 1;
  min-height: 44px;
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 600;
  line-height: 22px;
  border: 0;
  border-radius: 22px;
  cursor: pointer;
}

.browser-guide-copy {
  color: #fff;
  background: var(--primary);
}

.browser-guide-copy:disabled {
  opacity: 0.6;
  cursor: wait;
}

.browser-guide-close {
  color: #34373d;
  background: #eef2f7;
}

@media (min-width: 376px) {
  body {
    background: #edf1f5;
  }

  .wifi-page {
    box-shadow: 0 18px 44px rgb(25 42 70 / 12%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .carousel-track,
  .carousel-dot {
    transition: none;
  }
}
