* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  min-height: 100%;
}

html {
  font-family:
    "PingFang SC",
    "Microsoft YaHei",
    system-ui,
    -apple-system,
    sans-serif;
  font-size: 16px;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  color: #171b26;
}

button,
a {
  font: inherit;
}

button {
  border: 0;
}

button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(var(--tp04-theme-rgb), 0.48);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.tp04-page {
  position: relative;
  width: 100%;
  min-width: 1000px;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  background-color: #fff;
  background-image: var(--tp04-pc-bg);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
}

.tp04-title-row {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  color: var(--tp04-theme);
  white-space: nowrap;
}

.tp04-title-row img {
  display: block;
  width: 100px;
  height: auto;
}

.tp04-title-row span {
  margin: 0 40px;
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.06em;
}

.tp04-pc-home {
  --tp04-hero-width: min(76vw, calc((100dvh - 178px) * 1.756), 1167px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: clamp(10px, 1.8vh, 24px) 24px;
}

.tp04-pc-art {
  position: relative;
  width: calc(var(--tp04-hero-width) + clamp(74px, 8.5vw, 130px));
  max-width: 100%;
}

.tp04-pc-hero {
  display: block;
  width: var(--tp04-hero-width);
  height: auto;
  margin-left: clamp(74px, 8.5vw, 130px);
}

.tp04-pc-logo {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: clamp(132px, 10.7vw, 162px);
  height: auto;
}

.tp04-pc-home > .tp04-title-row {
  margin-top: clamp(8px, 1.7vh, 20px);
}

.tp04-pc-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: 100%;
  margin-top: clamp(12px, 2vh, 20px);
}

.tp04-action-wrap {
  position: relative;
}

.tp04-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: min(26vw, 320px);
  height: 64px;
  padding: 0 26px;
  border: 1px solid rgba(var(--tp04-theme-rgb), 0.76);
  border-radius: 12px;
  background: linear-gradient(
    180deg,
    #fff 0%,
    rgba(var(--tp04-theme-rgb), 0.07) 100%
  );
  box-shadow:
    0 2px 0 rgba(var(--tp04-theme-rgb), 0.58),
    0 8px 24px rgba(30, 86, 170, 0.09);
  color: var(--tp04-theme);
  cursor: pointer;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease;
}

.tp04-action:hover:not(:disabled) {
  transform: translateY(-1px);
  background: rgba(var(--tp04-theme-rgb), 0.11);
  box-shadow:
    0 2px 0 rgba(var(--tp04-theme-rgb), 0.72),
    0 12px 28px rgba(30, 86, 170, 0.15);
}

.tp04-action:active:not(:disabled) {
  transform: translateY(1px);
}

.tp04-action:disabled {
  cursor: default;
  opacity: 0.48;
}

.tp04-action img {
  display: block;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  object-fit: contain;
  margin-right: 12px;
}

.tp04-action span {
  overflow: hidden;
  font-size: 18px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tp04-sites-popover {
  position: absolute;
  z-index: 20;
  bottom: calc(100% + 16px);
  left: 50%;
  width: 420px;
  max-height: min(50vh, 430px);
  padding: 18px;
  overflow-y: auto;
  transform: translateX(-50%);
  border: 1px solid rgba(var(--tp04-theme-rgb), 0.52);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 20px 50px rgba(26, 54, 104, 0.2);
}

.tp04-sites-popover::after {
  position: absolute;
  bottom: -9px;
  left: 50%;
  width: 16px;
  height: 16px;
  transform: translateX(-50%) rotate(45deg);
  border-right: 1px solid rgba(var(--tp04-theme-rgb), 0.52);
  border-bottom: 1px solid rgba(var(--tp04-theme-rgb), 0.52);
  background: white;
  content: "";
}

.tp04-sites-heading {
  color: var(--tp04-theme);
  font-size: 20px;
  font-weight: 700;
  text-align: center;
}

.tp04-site-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.tp04-site-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 46px;
  padding: 8px 10px 8px 14px;
  border: 1px solid rgba(var(--tp04-theme-rgb), 0.24);
  border-radius: 10px;
  background: rgba(var(--tp04-theme-rgb), 0.04);
}

.tp04-site-url {
  min-width: 0;
  flex: 1;
  overflow: hidden;
  color: #374258;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tp04-site-go {
  flex: 0 0 auto;
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--tp04-theme);
  color: #fff;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
}

.tp04-sites-safe {
  margin-top: 14px;
  color: #7d879a;
  font-size: 13px;
  text-align: center;
}

.tp04-pc-download {
  min-height: 100vh;
  min-height: 100dvh;
  padding: 24px 32px;
}

.tp04-download-layout {
  display: grid;
  grid-template-columns: minmax(520px, 680px) minmax(460px, 725px);
  align-items: center;
  justify-content: center;
  gap: clamp(14px, 2.5vw, 48px);
  width: min(94vw, 1450px);
  min-height: calc(100vh - 48px);
  min-height: calc(100dvh - 48px);
  margin: 0 auto;
}

.tp04-download-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

.tp04-logo-button {
  display: block;
  padding: 0;
  background: transparent;
  cursor: pointer;
}

.tp04-logo-button img {
  display: block;
  width: clamp(200px, 18vw, 260px);
  height: auto;
}

.tp04-download-title {
  margin-top: 8px;
}

.tp04-download-title img {
  width: clamp(74px, 7vw, 100px);
}

.tp04-download-title span {
  margin: 0 clamp(18px, 2.3vw, 38px);
  font-size: clamp(20px, 1.8vw, 28px);
}

.tp04-qr-card {
  display: grid;
  width: 146px;
  height: 146px;
  margin-top: 18px;
  padding: 12px;
  place-items: center;
  border: 6px solid rgba(var(--tp04-theme-rgb), 0.82);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(31, 82, 155, 0.13);
}

.tp04-qr-card canvas,
.tp04-qr-card table {
  display: block;
  width: 112px !important;
  height: 112px !important;
}

.tp04-qr-label {
  margin-top: 12px;
  color: #111;
  font-size: 16px;
  font-weight: 600;
}

.tp04-features {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  width: min(100%, 680px);
  margin-top: 22px;
}

.tp04-feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

.tp04-feature img {
  display: block;
  width: 70px;
  height: 70px;
  object-fit: contain;
}

.tp04-feature span {
  margin-top: 10px;
  color: #111;
  font-size: 18px;
  font-weight: 500;
  white-space: nowrap;
}

.tp04-description {
  width: min(100%, 680px);
  margin-top: 22px;
  color: #111;
  font-size: 14px;
  line-height: 1.65;
  text-align: left;
}

.tp04-download-visual img {
  display: block;
  width: min(45vw, 725px);
  height: auto;
}

.tp04-mobile,
.tp04-sites-modal {
  display: none;
}

@media (max-width: 768px) {
  .tp04-page {
    min-width: 0;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: visible;
    background-image: var(--tp04-h5-bg);
    background-position: center top;
    background-size: 100% 100%;
  }

  .tp04-pc-home,
  .tp04-pc-download {
    display: none !important;
  }

  .tp04-mobile {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: max(10px, env(safe-area-inset-top)) 10px
      max(30px, env(safe-area-inset-bottom));
  }

  .tp04-mobile-logo {
    display: block;
    width: min(36vw, 174px);
    height: auto;
    max-height: 64px;
    object-fit: contain;
  }

  .tp04-mobile > .tp04-title-row {
    width: 100%;
    margin: 16px auto 14px;
  }

  .tp04-title-row img {
    width: min(25vw, 98px);
  }

  .tp04-title-row span {
    margin: 0 10px;
    font-size: 14px;
    line-height: 20px;
    letter-spacing: 0;
  }

  .tp04-mobile-hero {
    display: block;
    width: min(calc(100vw - 20px), 360px);
    aspect-ratio: 360 / 290;
    object-fit: contain;
  }

  .tp04-mobile-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    width: 100%;
    margin-top: 18px;
  }

  .tp04-mobile .tp04-action {
    width: min(calc(100vw - 48px), 290px);
    height: 40px;
    padding: 0 22px;
    border-radius: 11px;
  }

  .tp04-mobile .tp04-action img {
    width: 27px;
    height: 27px;
    margin-right: 26px;
  }

  .tp04-mobile .tp04-action span {
    min-width: 92px;
    font-size: 14px;
    text-align: left;
  }

  .tp04-sites-modal:not([hidden]) {
    position: fixed;
    z-index: 100;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 22px;
  }

  .tp04-modal-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 22, 42, 0.52);
    cursor: pointer;
  }

  .tp04-sites-card {
    position: relative;
    z-index: 1;
    width: min(100%, 420px);
    max-height: min(78vh, 560px);
    padding: 24px 18px 18px;
    overflow-y: auto;
    border: 1px solid rgba(var(--tp04-theme-rgb), 0.44);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 24px 70px rgba(6, 24, 54, 0.28);
  }

  .tp04-modal-close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 34px;
    height: 34px;
    background: transparent;
    color: #73809a;
    cursor: pointer;
    font-size: 30px;
    line-height: 34px;
  }

  .tp04-sites-heading {
    font-size: 19px;
  }
}

@media (max-width: 350px) {
  .tp04-mobile > .tp04-title-row {
    margin-top: 10px;
    margin-bottom: 8px;
  }

  .tp04-mobile-actions {
    gap: 12px;
    margin-top: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tp04-action {
    transition: none;
  }
}
