:root {
  --design-unit: min(1px, 0.133333vw);
  --page-bg: #f7f7fa;
  --line: #d9d9dc;
  --muted: #898989;
  --black: #080808;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--page-bg);
  color: var(--black);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 280px;
  min-height: 100vh;
  background: var(--page-bg);
}

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

button {
  font: inherit;
}

.page-shell {
  width: min(100%, 750px);
  min-height: 100vh;
  margin: 0 auto;
  padding-bottom: max(calc(10 * var(--design-unit)), env(safe-area-inset-bottom));
  background: var(--page-bg);
  overflow: hidden;
}

.site-header {
  height: calc(91 * var(--design-unit));
  padding: calc(15 * var(--design-unit)) calc(12 * var(--design-unit)) calc(14 * var(--design-unit)) calc(21 * var(--design-unit));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(12 * var(--design-unit));
  background: #fff;
}

.site-logo {
  display: block;
  width: calc(270 * var(--design-unit));
  height: calc(55 * var(--design-unit));
  object-fit: contain;
  object-position: left center;
}

.share-button {
  width: calc(213 * var(--design-unit));
  height: calc(56 * var(--design-unit));
  flex: 0 0 auto;
  border: 0;
  border-radius: calc(29 * var(--design-unit));
  background: #171717;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(10 * var(--design-unit));
  padding: 0 calc(20 * var(--design-unit));
  font-size: calc(27 * var(--design-unit));
  font-weight: 700;
  cursor: pointer;
  transition: background-color .18s ease, transform .18s ease;
}

.share-button:active {
  transform: scale(.97);
}

.share-button.is-copied {
  background: #15803d;
}

.share-button .function-icon {
  width: calc(30 * var(--design-unit));
  height: calc(30 * var(--design-unit));
  object-fit: contain;
  filter: brightness(0) invert(1);
  flex: 0 0 auto;
}

.banner {
  display: block;
  margin: calc(16 * var(--design-unit)) calc(16 * var(--design-unit)) 0;
  border-radius: calc(25 * var(--design-unit));
  overflow: hidden;
  aspect-ratio: 3 / 1;
  background: #111;
}

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

.notice-bar {
  width: calc(100% - 32 * var(--design-unit));
  min-height: calc(55 * var(--design-unit));
  margin: calc(20 * var(--design-unit)) calc(16 * var(--design-unit)) 0;
  padding: calc(8 * var(--design-unit)) calc(13 * var(--design-unit));
  border: calc(1 * var(--design-unit)) solid var(--line);
  border-radius: calc(14 * var(--design-unit));
  background: #fff;
  color: #111;
  display: flex;
  align-items: center;
  gap: calc(10 * var(--design-unit));
  text-align: left;
  font-size: calc(23 * var(--design-unit));
  font-weight: 300;
  cursor: pointer;
  box-shadow: 0 calc(2 * var(--design-unit)) calc(5 * var(--design-unit)) rgba(0, 0, 0, .03);
}

.notice-bar .function-icon {
  width: calc(29 * var(--design-unit));
  height: calc(29 * var(--design-unit));
  object-fit: contain;
  flex: 0 0 auto;
}

.notice-bar strong {
  flex: 0 0 auto;
  font-weight: 700;
}

.notice-copy {
  min-width: 0;
  color: #555;
  font-weight: 300;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.category-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: calc(36 * var(--design-unit));
  margin: calc(22 * var(--design-unit)) calc(16 * var(--design-unit)) 0;
}

.category-tab {
  height: calc(63 * var(--design-unit));
  min-width: 0;
  padding: 0 calc(12 * var(--design-unit));
  border: calc(1 * var(--design-unit)) solid #d6d6d8;
  border-radius: calc(14 * var(--design-unit));
  background: #fff;
  color: #090909;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(10 * var(--design-unit));
  font-size: calc(25 * var(--design-unit));
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 calc(2 * var(--design-unit)) calc(5 * var(--design-unit)) rgba(0, 0, 0, .03);
  transition: color .18s ease, background-color .18s ease, border-color .18s ease, transform .18s ease;
}

.category-tab:hover {
  border-color: #999;
}

.category-tab:active {
  transform: scale(.98);
}

.category-tab.is-active {
  border-color: #111;
  background: linear-gradient(90deg, #050505, #242424);
  color: #fff;
  font-weight: 700;
}

.category-tab .function-icon {
  width: calc(34 * var(--design-unit));
  height: calc(34 * var(--design-unit));
  object-fit: contain;
  flex: 0 0 auto;
  transition: filter .18s ease;
}

.category-tab.is-active .function-icon {
  filter: brightness(0) invert(1);
}

.app-list {
  margin: calc(22 * var(--design-unit)) calc(16 * var(--design-unit)) 0;
  display: grid;
  gap: calc(20 * var(--design-unit));
}

.app-card {
  position: relative;
  min-height: calc(182 * var(--design-unit));
  padding: calc(18 * var(--design-unit)) calc(242 * var(--design-unit)) calc(18 * var(--design-unit)) calc(28 * var(--design-unit));
  border: calc(1 * var(--design-unit)) solid #d6d6d8;
  border-radius: calc(22 * var(--design-unit));
  background: #fff;
  display: grid;
  grid-template-columns: calc(145 * var(--design-unit)) minmax(0, 1fr);
  align-items: center;
  gap: calc(34 * var(--design-unit));
  box-shadow: 0 calc(2 * var(--design-unit)) calc(5 * var(--design-unit)) rgba(0, 0, 0, .025);
}

.app-icon {
  display: block;
  width: calc(145 * var(--design-unit));
  height: calc(145 * var(--design-unit));
  border-radius: calc(17 * var(--design-unit));
  object-fit: cover;
}

.app-content {
  min-width: 0;
  align-self: center;
}

.app-title {
  margin: 0 0 calc(7 * var(--design-unit));
  color: var(--theme-color, #0a0704);
  font-size: calc(32 * var(--design-unit));
  line-height: 1.2;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-description {
  margin: 0;
  color: var(--muted);
  font-size: calc(24 * var(--design-unit));
  line-height: 1.35;
}

.visit-button {
  position: absolute;
  right: calc(34 * var(--design-unit));
  bottom: calc(25 * var(--design-unit));
  min-width: calc(188 * var(--design-unit));
  height: calc(54 * var(--design-unit));
  padding: 0 calc(20 * var(--design-unit));
  border-radius: calc(28 * var(--design-unit));
  background: var(--theme-color, #0a0704);
  background: linear-gradient(90deg, var(--theme-color, #0a0704), color-mix(in srgb, var(--theme-color, #0a0704) 80%, white));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: calc(8 * var(--design-unit));
  text-decoration: none;
  font-size: calc(27 * var(--design-unit));
  line-height: 1;
  font-weight: 800;
  white-space: nowrap;
  animation: visit-pulse 1.6s ease-in-out infinite;
  transform-origin: center;
  transition: filter .18s ease;
}

.visit-button:hover {
  filter: brightness(1.08);
}

.visit-button:active {
  animation: none;
  transform: scale(.97);
}

.visit-button[aria-disabled="true"] {
  cursor: default;
}

.site-footer {
  margin: calc(18 * var(--design-unit)) calc(16 * var(--design-unit)) 0;
  color: #707070;
  font-size: calc(25 * var(--design-unit));
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-weight: 400;
  line-height: 1.4;
  text-align: center;
  white-space: nowrap;
}

@keyframes visit-pulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.045);
  }
}

.customer-service-button {
  position: fixed;
  right: 30px;
  bottom: calc(30px + env(safe-area-inset-bottom));
  z-index: 1000;
  width: 60px;
  height: 60px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: #000;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.customer-service-button svg {
  width: 21px;
  height: 21px;
  fill: currentColor;
}

.customer-service-button:active {
  transform: scale(.96);
}

.customer-modal[hidden] {
  display: none;
}

.customer-modal {
  position: fixed;
  inset: 0;
  z-index: 1001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.customer-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .5);
}

.customer-card {
  position: relative;
  z-index: 1;
  width: min(90%, 400px);
  padding: 20px 0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 20px rgba(0, 0, 0, .15);
  animation: customer-fade-in-up .3s ease;
}

.customer-close {
  position: absolute;
  top: 10px;
  right: 15px;
  z-index: 1;
  padding: 5px;
  border: 0;
  background: transparent;
  color: #888;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.customer-close:hover {
  color: #555;
}

.customer-item {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  border-bottom: 1px solid #f0f0f0;
}

.customer-item:last-child {
  border-bottom: 0;
}

.customer-item-icon {
  width: 40px;
  height: 40px;
  margin-right: 15px;
  border-radius: 50%;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.customer-item-icon svg {
  width: 20px;
  height: 20px;
  fill: #fff;
}

.customer-info {
  min-width: 0;
  flex: 1 1 auto;
}

.customer-name {
  margin-bottom: 3px;
  color: #333;
  font-size: 16px;
  font-weight: 600;
}

.customer-value {
  color: #888;
  font-size: 14px;
  overflow-wrap: anywhere;
}

.customer-copy {
  flex: 0 0 auto;
  padding: 6px 12px;
  border: 0;
  border-radius: 4px;
  background: #000;
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  transition: background-color .2s ease;
}

.customer-copy:hover {
  background: #1765cc;
}

.customer-copy:active {
  background: #1457b3;
}

@keyframes customer-fade-in-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .52);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(100%, 420px);
  padding: 28px 24px 22px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
}

.modal-card h2 {
  margin: 0 0 18px;
  text-align: center;
  font-size: 22px;
}

.modal-card p {
  margin: 0 0 12px;
  color: #444;
  font-size: 16px;
  line-height: 1.65;
}

.modal-close {
  position: absolute;
  top: 8px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: #777;
  font-size: 28px;
  cursor: pointer;
}

.modal-confirm {
  width: 100%;
  height: 44px;
  margin-top: 8px;
  border: 0;
  border-radius: 9px;
  background: #111;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: max(28px, env(safe-area-inset-bottom));
  z-index: 120;
  padding: 10px 18px;
  border-radius: 22px;
  background: rgba(0, 0, 0, .82);
  color: #fff;
  font-size: 14px;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity .2s ease, transform .2s ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

:focus-visible {
  outline: 3px solid #2d8cff;
  outline-offset: 2px;
}

@media (min-width: 768px) {
  .notice-bar {
    min-height: 48px;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 16px;
  }

  .notice-bar .function-icon {
    width: 18px;
    height: 18px;
  }

  .category-tabs {
    gap: 16px;
  }

  .category-tab {
    height: 45px;
    padding: 0 16px;
    border-radius: 8px;
    font-size: 16px;
  }

  .category-tab .function-icon {
    width: 24px;
    height: 24px;
  }

  .app-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
  }

  .app-card {
    min-height: 114px;
    padding: 16px 120px 16px 16px;
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 12px;
    border-radius: 12px;
  }

  .app-icon {
    width: 80px;
    height: 80px;
    border-radius: 9px;
  }

  .app-title {
    margin-bottom: 4px;
    font-size: 18px;
  }

  .app-description {
    font-size: 14px;
    line-height: 1.45;
  }

  .visit-button {
    right: 12px;
    bottom: 12px;
    min-width: 106px;
    height: 35px;
    padding: 0 12px;
    border-radius: 18px;
    font-size: 15px;
  }

  .site-footer {
    font-size: 14px;
  }
}

@media (max-width: 430px) {
  .customer-service-button {
    right: 20px;
    bottom: calc(20px + env(safe-area-inset-bottom));
  }

  .app-card {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 16px;
    min-height: 91px;
    padding: 9px 121px 9px 14px;
  }

  .app-icon {
    width: 72px;
    height: 72px;
    border-radius: 9px;
  }

  .app-title {
    margin-bottom: 4px;
    font-size: 16px;
  }

  .app-description {
    font-size: 13px;
  }

  .visit-button {
    right: 17px;
    bottom: 12px;
    min-width: 94px;
    height: 28px;
    padding: 0 10px;
    border-radius: 15px;
    font-size: 14px;
  }

  .site-footer {
    font-size: 13px;
  }
}

@media (max-width: 350px) {
  .category-tab {
    gap: 4px;
    font-size: 13px;
  }

  .app-card {
    grid-template-columns: 64px minmax(0, 1fr);
    padding-right: 94px;
  }

  .app-icon {
    width: 64px;
    height: 64px;
  }

  .visit-button {
    right: 10px;
    bottom: 10px;
    min-width: 80px;
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}
