:root {
  color-scheme: light;
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  color: #172f50;
  background: #ffffff;
  font-size: 14px;
}

* {
  box-sizing: border-box;
}

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

body {
  background: #ffffff;
}

button,
a {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  letter-spacing: 0;
}

[hidden] {
  display: none !important;
}

.gateway-view {
  min-height: 100vh;
  padding: 40px 16px;
  background: #ffffff;
}

.gateway-shell {
  width: min(100%, 408px);
  min-height: calc(100vh - 80px);
  margin: 0 auto;
  padding: 22px 18px 26px;
  border: 1px solid #e2e5e9;
  background: #ffffff;
}

.gateway-copy {
  text-align: center;
}

.gateway-copy h1 {
  margin: 0 auto;
  color: #174472;
  font-size: 30px;
  line-height: 1.45;
  letter-spacing: 0;
}

.gateway-status,
.gateway-help {
  margin: 18px 0 0;
  color: #8a96a4;
  font-size: 14px;
  line-height: 1.6;
}

.gateway-help {
  margin-top: 10px;
}

.line-list {
  display: grid;
  gap: 12px;
  margin-top: 17px;
}

.line-button {
  display: grid;
  width: 100%;
  min-height: 50px;
  padding: 0 16px;
  grid-template-columns: 1fr auto;
  align-items: center;
  border: 0;
  border-radius: 6px;
  color: #ffffff;
  background: #13b719;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .07);
  cursor: pointer;
  font-size: 17px;
  font-weight: 700;
}

.line-button:hover,
.line-button:focus-visible {
  background: #079c0e;
  outline: 3px solid rgba(19, 183, 25, .2);
  outline-offset: 2px;
}

.line-name {
  justify-self: center;
}

.line-latency {
  min-width: 42px;
  text-align: right;
  font-size: 13px;
}

.line-button.testing .line-latency {
  opacity: .72;
}

.quick-links {
  display: grid;
  margin: 21px 26px 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 34px;
  row-gap: 14px;
}

.quick-link {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 9px;
  color: #173a64;
  font-size: 14px;
  font-weight: 700;
}

.quick-link:hover,
.quick-link:focus-visible {
  color: #c8202d;
  outline: none;
}

.quick-icon {
  display: grid;
  width: 21px;
  height: 21px;
  flex: 0 0 21px;
  place-items: center;
  border-radius: 5px;
  color: #ffffff;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.quick-icon-red { background: #e14b3e; }
.quick-icon-blue { background: #397ee8; }
.quick-icon-green { background: #17a879; }
.quick-icon-gold { background: #d99000; }

.browser-recommendation {
  margin-top: 28px;
  padding-top: 17px;
  border-top: 1px solid #d9dde2;
  color: #8a96a4;
  text-align: center;
}

.browser-recommendation p {
  margin: 0 0 14px;
}

.browser-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.browser-list span {
  display: grid;
  min-width: 0;
  justify-items: center;
  gap: 5px;
  color: #546579;
  font-size: 11px;
}

.browser-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 3px solid currentColor;
  border-radius: 50%;
  background: #ffffff;
  font-style: normal;
  font-weight: 800;
}

.browser-chrome { color: #db4437; border-right-color: #0f9d58; border-bottom-color: #f4b400; }
.browser-edge { color: #087fc3; }
.browser-firefox { color: #ea5b24; }
.browser-safari { color: #2196d4; }

.directory-view {
  min-height: 100vh;
  padding: 36px 14px 0;
  color: #ffffff;
  background: #080b0f;
}

.directory-shell {
  width: min(100%, 408px);
  margin: 0 auto;
}

.brand-banner {
  display: grid;
  min-height: 62px;
  padding: 7px 10px;
  grid-template-columns: 42px 1fr 32px;
  align-items: center;
  gap: 5px;
  border: 7px solid #1c2531;
  border-radius: 8px;
  color: #d30000;
  background: #ffef00;
  box-shadow: inset 0 0 0 1px #e7a500;
}

.brand-banner:focus-visible {
  outline: 3px solid #20be3b;
  outline-offset: 2px;
}

.brand-seal {
  display: grid;
  width: 37px;
  height: 37px;
  place-items: center;
  border: 2px solid #d00000;
  border-radius: 50%;
  color: #d00000;
  background: #fff5b6;
  font-size: 19px;
  font-weight: 900;
}

.brand-title {
  white-space: nowrap;
  font-family: KaiTi, STKaiti, "Microsoft YaHei", sans-serif;
  font-size: 30px;
  font-weight: 900;
  line-height: 1;
}

.brand-mark {
  justify-self: end;
  color: #ffffff;
  background: #d40000;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
}

.ad-banner {
  display: block;
  width: calc(100% - 16px);
  height: 58px;
  margin: 10px auto;
  object-fit: cover;
  object-position: center;
  background: #171d27;
}

.site-grid {
  display: grid;
  padding: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  border: 1px solid #303a49;
  border-radius: 8px;
  background: #434a55;
}

.site-item {
  display: grid;
  min-width: 0;
  min-height: 114px;
  padding: 10px 9px 8px;
  grid-template-rows: 64px auto;
  align-items: center;
  gap: 7px;
  overflow: hidden;
  border: 1px solid #303a49;
  border-radius: 8px;
  color: #ffffff;
  background: #101620;
}

.site-item:hover,
.site-item:focus-visible {
  border-color: #30c743;
  outline: 2px solid rgba(48, 199, 67, .35);
  outline-offset: 1px;
  background: #151e29;
}

.site-logo {
  display: flex;
  width: 100%;
  height: 64px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: #ffffff;
  background: transparent;
  font-size: 21px;
  font-weight: 800;
}

.site-logo img {
  display: block;
  width: auto;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
  border-radius: 8px;
  background: transparent;
}

.site-logo-49 {
  align-content: center;
  gap: 1px;
  color: #0a9edd;
  background: #ffffff;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.site-logo-49 strong {
  font-size: 21px;
}

.site-logo-49 small {
  color: #237bb9;
  font-size: 10px;
  font-weight: 700;
}

.site-name {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  text-overflow: ellipsis;
  text-shadow: 1px 1px 0 #006cab, -1px -1px 0 #006cab;
  white-space: nowrap;
}

.empty {
  display: grid;
  min-height: 180px;
  place-content: center;
  gap: 7px;
  border: 1px solid #303a49;
  border-radius: 0 0 8px 8px;
  color: #91a0b1;
  background: #121821;
  text-align: center;
}

.empty strong {
  color: #ffffff;
  font-size: 16px;
}

.empty span {
  font-size: 12px;
}

@media (max-width: 540px) {
  .site-item {
    grid-template-rows: 56px auto;
  }

  .site-logo {
    height: 56px;
  }
}

@media (max-width: 440px) {
  .gateway-view {
    padding: 28px 0 0;
  }

  .gateway-shell {
    min-height: calc(100vh - 28px);
    padding: 18px 12px 24px;
    border-right: 0;
    border-bottom: 0;
    border-left: 0;
  }

  .gateway-copy h1 {
    max-width: 340px;
    font-size: 27px;
  }

  .line-button {
    min-height: 46px;
    font-size: 15px;
  }

  .quick-links {
    margin-right: 18px;
    margin-left: 18px;
    column-gap: 22px;
  }

  .directory-view {
    padding: 16px 8px 0;
  }

  .brand-banner {
    min-height: 56px;
    padding: 6px;
    grid-template-columns: 35px 1fr 26px;
    border-width: 5px;
  }

  .brand-seal {
    width: 32px;
    height: 32px;
    font-size: 16px;
  }

  .brand-title {
    font-size: 25px;
  }

  .ad-banner {
    width: calc(100% - 8px);
    height: 53px;
  }

  .site-grid {
    padding: 7px;
    gap: 8px;
  }

  .site-item {
    min-height: 104px;
    padding: 8px 7px 7px;
    grid-template-rows: 56px auto;
  }

  .site-logo {
    height: 56px;
  }

}

@media (max-width: 350px) {
  .brand-banner {
    grid-template-columns: 35px 1fr 26px;
  }

  .line-latency {
    display: none;
  }

  .line-button {
    grid-template-columns: 1fr;
  }

  .site-item {
    min-height: 102px;
    grid-template-rows: 56px auto;
  }

  .site-logo {
    height: 56px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
