* {
  box-sizing: border-box;
}

.site-frame-body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", "Microsoft JhengHei", sans-serif;
  background: #f6f7f9;
  color: #171827;
  line-height: 1.6;
  padding-bottom: calc(96px + env(safe-area-inset-bottom, 0px));
}

.site-header {
  background: #1a1a2e;
  color: #fff;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 100;
}

.site-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 18px;
}

.site-brand img {
  width: 28px;
  height: 28px;
  border-radius: 4px;
  object-fit: cover;
  flex: 0 0 auto;
}

.site-brand span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav a {
  color: #fff;
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 8px;
  background: rgba(255, 255, 255, .08);
}

.site-nav a:hover {
  background: rgba(255, 255, 255, .14);
}

.site-bottom-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #1a1a2e;
  border-top: 2px solid #f97316;
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  font-size: 12px;
  color: #fff;
}

.site-bottom-banner .mark {
  color: #f97316;
  font-weight: 900;
  font-size: 14px;
}

.site-bottom-banner .text {
  flex: 1;
  line-height: 1.5;
  min-width: 0;
}

.site-bottom-banner .text strong {
  color: #f97316;
}

.site-bottom-banner .links {
  font-size: 11px;
  white-space: nowrap;
}

.site-bottom-banner .links a {
  color: #9ca3af;
  text-decoration: none;
}

.site-bottom-banner .links a:hover {
  color: #fff;
}

.site-bottom-banner .links span {
  margin: 0 4px;
  color: #4b5563;
}

@media (max-width: 640px) {
  .site-frame-body {
    padding-bottom: calc(112px + env(safe-area-inset-bottom, 0px));
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
    padding: 10px 14px 12px;
  }

  .site-brand {
    width: 100%;
    font-size: 17px;
  }

  .site-brand img {
    width: 26px;
    height: 26px;
  }

  .site-nav {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    justify-content: stretch;
    width: 100%;
    gap: 6px;
  }

  .site-nav a {
    min-width: 0;
    padding: 7px 4px;
    text-align: center;
  }

  .site-bottom-banner {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: start;
    gap: 3px 8px;
    padding: 8px 10px;
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    line-height: 1.35;
  }

  .site-bottom-banner .mark {
    grid-row: 1 / span 2;
    padding-top: 1px;
  }

  .site-bottom-banner .text {
    line-height: 1.35;
  }

  .site-bottom-banner .links {
    grid-column: 2;
    max-width: none;
    white-space: normal;
    text-align: left;
    font-size: 10px;
  }

  .site-bottom-banner .links span {
    margin: 0 3px;
  }
}
