:root {
  --bg: #09090a;
  --panel: rgba(22, 22, 23, 0.86);
  --panel-strong: #181819;
  --line: rgba(255, 255, 255, 0.09);
  --line-gold: rgba(218, 171, 77, 0.34);
  --gold: #e2b756;
  --gold-light: #f6d98f;
  --gold-deep: #9e6c20;
  --text: #f6f3ec;
  --muted: #aaa69e;
  --muted-strong: #d2cec5;
  --success: #8bc268;
  --warning: #e2ae54;
  --danger: #dd705f;
  --radius-xl: 30px;
  --radius-lg: 20px;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.44);
  color-scheme: dark;
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-width: 320px;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 13% 10%, rgba(167, 112, 28, 0.14), transparent 27rem),
    radial-gradient(circle at 88% 68%, rgba(222, 173, 72, 0.08), transparent 30rem),
    linear-gradient(145deg, #080809 0%, #111112 53%, #09090a 100%);
}

body.modal-open {
  overflow: hidden;
}

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

button {
  font: inherit;
}

.ambient {
  position: fixed;
  z-index: -2;
  width: 28rem;
  height: 28rem;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.2;
  pointer-events: none;
}

.ambient-one {
  top: -16rem;
  left: 8%;
  background: #c58925;
}

.ambient-two {
  right: -16rem;
  bottom: -12rem;
  background: #7b5422;
}

.grain {
  position: fixed;
  z-index: -1;
  inset: 0;
  opacity: 0.18;
  pointer-events: none;
  background-image:
    radial-gradient(circle at 12% 18%, rgba(255, 255, 255, 0.06) 0 0.5px, transparent 0.8px),
    radial-gradient(circle at 72% 63%, rgba(255, 255, 255, 0.04) 0 0.5px, transparent 0.9px);
  background-size: 7px 7px, 11px 11px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 48px));
  height: 96px;
  margin: 0 auto;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand img {
  width: 44px;
  height: 44px;
  padding: 4px;
  border: 1px solid rgba(226, 183, 86, 0.45);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.025);
  object-fit: contain;
  box-shadow: 0 10px 24px rgba(169, 108, 22, 0.2);
}

.brand span {
  display: grid;
  gap: 1px;
}

.brand strong {
  font-size: 19px;
  font-weight: 650;
  letter-spacing: 0.24em;
}

.brand small {
  color: #9f9b94;
  font-size: 9px;
  letter-spacing: 0.42em;
}

.official-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #c8c3bb;
  background: rgba(255, 255, 255, 0.035);
  font-size: 12px;
  letter-spacing: 0.12em;
}

.official-badge i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 5px rgba(139, 194, 104, 0.08);
}

.page-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(430px, 520px);
  gap: clamp(44px, 8vw, 110px);
  align-items: center;
  width: min(1180px, calc(100% - 48px));
  min-height: calc(100vh - 190px);
  margin: 22px auto 0;
  padding-bottom: 70px;
}

.hero-copy {
  align-self: center;
  max-width: 630px;
}

.eyebrow {
  margin: 0 0 25px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.24em;
}

.hero-copy h1 {
  margin: 0;
  color: #f7f4ee;
  font-size: clamp(38px, 4.35vw, 62px);
  font-weight: 570;
  line-height: 1.13;
  letter-spacing: -0.035em;
}

.hero-copy h1 span {
  color: transparent;
  background: linear-gradient(105deg, #fff0b9 5%, #d6a64e 46%, #f5d58c 82%);
  -webkit-background-clip: text;
  background-clip: text;
}

.hero-subtitle {
  max-width: 530px;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.9;
  letter-spacing: 0.025em;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 38px;
  color: #b8b3aa;
  font-size: 13px;
}

.trust-row span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.check {
  position: relative;
  width: 17px;
  height: 17px;
  border: 1px solid rgba(226, 183, 86, 0.46);
  border-radius: 50%;
}

.check::after {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 6px;
  height: 3px;
  border-bottom: 1px solid var(--gold-light);
  border-left: 1px solid var(--gold-light);
  content: "";
  transform: rotate(-45deg);
}

.download-card {
  position: relative;
  overflow: hidden;
  min-height: 620px;
  padding: 32px;
  border: 1px solid var(--line-gold);
  border-radius: var(--radius-xl);
  background:
    linear-gradient(145deg, rgba(34, 33, 30, 0.92), rgba(17, 17, 18, 0.94)),
    var(--panel);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
}

.download-card::before {
  position: absolute;
  top: 0;
  left: 9%;
  width: 42%;
  height: 1px;
  content: "";
  background: linear-gradient(90deg, transparent, #e9bd62, transparent);
}

.card-glow {
  position: absolute;
  top: -11rem;
  right: -9rem;
  width: 24rem;
  height: 24rem;
  border-radius: 50%;
  background: rgba(204, 145, 43, 0.12);
  filter: blur(56px);
  pointer-events: none;
}

.app-identity {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
}

.app-icon-wrap {
  position: relative;
  flex: 0 0 auto;
  width: 74px;
  height: 74px;
  padding: 8px;
  overflow: hidden;
  border: 1px solid rgba(240, 198, 111, 0.38);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.025);
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.36);
}

.app-icon-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.icon-shine {
  position: absolute;
  top: -32px;
  left: -58px;
  width: 38px;
  height: 140px;
  background: rgba(255, 255, 255, 0.13);
  transform: rotate(28deg);
}

.identity-kicker {
  margin: 0 0 4px;
  color: var(--gold);
  font-size: 12px;
  letter-spacing: 0.16em;
}

.app-identity h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 590;
  letter-spacing: -0.02em;
}

.device-hint {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.platform-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin: 28px 0 26px;
  padding: 5px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 15px;
  background: rgba(0, 0, 0, 0.24);
}

.platform-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  height: 42px;
  padding: 0 7px;
  border: 0;
  border-radius: 11px;
  color: #8f8b84;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
  transition: color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.platform-tabs button:hover {
  color: #dad5cc;
}

.platform-tabs button.active {
  color: #f2d790;
  background: linear-gradient(135deg, rgba(213, 166, 71, 0.18), rgba(255, 255, 255, 0.055));
  box-shadow: inset 0 0 0 1px rgba(226, 183, 86, 0.2);
}

.tab-mark {
  display: inline-grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 7px;
  font-family: Georgia, serif;
  font-size: 11px;
}

.loading-panel {
  padding-top: 18px;
}

.skeleton {
  overflow: hidden;
  position: relative;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.055);
}

.skeleton::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent);
  animation: shimmer 1.4s infinite;
  transform: translateX(-100%);
}

.skeleton-title {
  width: 52%;
  height: 22px;
}

.skeleton-line {
  width: 82%;
  height: 14px;
  margin-top: 17px;
}

.skeleton-button {
  width: 100%;
  height: 56px;
  margin-top: 34px;
  border-radius: 15px;
}

@keyframes shimmer {
  100% { transform: translateX(100%); }
}

.release-summary {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
}

.release-summary > div {
  display: grid;
  gap: 5px;
}

.platform-label {
  color: #89857e;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.release-summary strong {
  color: var(--muted-strong);
  font-size: 15px;
  font-weight: 520;
}

.release-date {
  color: #77736d;
  font-size: 11px;
}

.route-notice {
  min-height: 44px;
  margin-top: 18px;
  padding: 12px 14px;
  border: 1px solid rgba(139, 194, 104, 0.15);
  border-radius: 12px;
  color: #b9cbb0;
  background: rgba(139, 194, 104, 0.055);
  font-size: 12px;
  line-height: 1.65;
}

.route-notice.warning {
  border-color: rgba(226, 174, 84, 0.2);
  color: #dec291;
  background: rgba(226, 174, 84, 0.065);
}

.primary-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 58px;
  margin-top: 18px;
  padding: 0 20px 0 22px;
  border: 0;
  border-radius: 15px;
  color: #1b160d;
  background: linear-gradient(110deg, #f1cf7a, #dca846 56%, #f0cd73);
  box-shadow: 0 14px 30px rgba(190, 130, 33, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  cursor: pointer;
  font-size: 15px;
  font-weight: 650;
  letter-spacing: 0.02em;
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.primary-action:hover:not(:disabled) {
  filter: brightness(1.05);
  box-shadow: 0 18px 36px rgba(190, 130, 33, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
}

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

.primary-action.disabled,
.primary-action:disabled {
  color: #77736c;
  background: #292827;
  box-shadow: none;
  cursor: not-allowed;
}

.action-arrow {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(36, 26, 11, 0.22);
  border-radius: 50%;
  font-size: 14px;
}

.package-meta {
  margin-top: 11px;
  overflow: hidden;
  color: #7f7b74;
  font-size: 10px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.alternative-section {
  margin-top: 13px;
}

.alternative-toggle {
  width: 100%;
  padding: 8px;
  border: 0;
  color: #a9a49c;
  background: transparent;
  cursor: pointer;
  font-size: 12px;
}

.alternative-toggle span {
  display: inline-block;
  margin-left: 4px;
  transition: transform 160ms ease;
}

.alternative-toggle[aria-expanded="true"] span {
  transform: rotate(180deg);
}

.alternative-list {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.alternative-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 44px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: #c8c3ba;
  background: rgba(255, 255, 255, 0.025);
  cursor: pointer;
  font-size: 12px;
  text-align: left;
}

.alternative-action:hover {
  border-color: rgba(226, 183, 86, 0.28);
  color: #ecd18e;
  background: rgba(226, 183, 86, 0.04);
}

.market-section {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 11px;
}

.section-heading h3 {
  margin: 0;
  color: #c9c4ba;
  font-size: 13px;
  font-weight: 560;
}

.section-heading > span {
  color: #6f6b65;
  font-size: 10px;
}

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

.market-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  color: #a9a59e;
  background: rgba(255, 255, 255, 0.022);
  font: inherit;
  text-align: left;
}

button.market-item {
  cursor: pointer;
}

button.market-item:hover {
  border-color: rgba(226, 183, 86, 0.22);
}

.market-item.matched {
  border-color: rgba(226, 183, 86, 0.17);
  background: rgba(226, 183, 86, 0.035);
}

.market-name {
  display: grid;
  min-width: 0;
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-name small {
  margin-top: 2px;
  color: #8e7040;
  font-size: 8px;
}

.market-status {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  margin-left: 7px;
  font-size: 9px;
}

.market-status i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.market-status.online { color: var(--success); }
.market-status.reviewing { color: var(--warning); }
.market-status.offline { color: #706d67; }

.changelog-section {
  margin-top: 17px;
  border-top: 1px solid var(--line);
}

.changelog-section summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 0 4px;
  color: #aaa69e;
  cursor: pointer;
  font-size: 12px;
  list-style: none;
}

.changelog-section summary::-webkit-details-marker { display: none; }
.changelog-section[open] summary span { transform: rotate(45deg); }
.changelog-section summary span { transition: transform 160ms ease; }

.changelog {
  padding: 6px 0 1px;
  color: #85817a;
  font-size: 11px;
  line-height: 1.75;
}

.changelog ul {
  margin: 0;
  padding-left: 18px;
}

.error-panel {
  padding: 40px 8px 20px;
  color: #99958e;
  text-align: center;
}

.error-symbol {
  display: grid;
  width: 42px;
  height: 42px;
  margin: 0 auto 14px;
  place-items: center;
  border: 1px solid rgba(221, 112, 95, 0.35);
  border-radius: 50%;
  color: var(--danger);
}

.error-panel strong {
  color: #d0cbc2;
  font-size: 14px;
}

.error-panel p {
  margin: 8px 0 18px;
  font-size: 11px;
}

.error-panel button {
  padding: 9px 18px;
  border: 1px solid rgba(226, 183, 86, 0.28);
  border-radius: 10px;
  color: #e4c57e;
  background: rgba(226, 183, 86, 0.06);
  cursor: pointer;
  font-size: 12px;
}

.assurance-grid {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.assurance-grid article {
  position: relative;
  min-height: 150px;
  padding: 24px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.024);
}

.assurance-index {
  position: absolute;
  top: 17px;
  right: 19px;
  color: rgba(226, 183, 86, 0.26);
  font-family: Georgia, serif;
  font-size: 24px;
}

.assurance-grid h3 {
  margin: 14px 0 10px;
  color: #d8d3ca;
  font-size: 14px;
  font-weight: 560;
}

.assurance-grid p {
  margin: 0;
  color: #77736d;
  font-size: 11px;
  line-height: 1.75;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1180px, calc(100% - 48px));
  margin: 0 auto;
  padding: 26px 0 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.055);
  color: #615e59;
  font-size: 10px;
}

.footer-identity {
  display: grid;
  gap: 7px;
}

.site-footer p { margin: 0; }
.filing-links {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 16px;
}
.site-footer nav { display: flex; gap: 20px; }
.site-footer a { color: #716d66; text-decoration: none; }
.site-footer a:hover { color: #b79b61; }

.browser-guide {
  position: fixed;
  z-index: 100;
  inset: 0;
}

.guide-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
}

.guide-card {
  position: absolute;
  top: max(18px, env(safe-area-inset-top));
  right: 18px;
  width: min(360px, calc(100% - 36px));
  padding: 26px;
  border: 1px solid rgba(226, 183, 86, 0.28);
  border-radius: 20px;
  background: #1b1a19;
  box-shadow: var(--shadow);
}

.guide-card::before {
  position: absolute;
  top: -8px;
  right: 22px;
  width: 14px;
  height: 14px;
  border-top: 1px solid rgba(226, 183, 86, 0.28);
  border-left: 1px solid rgba(226, 183, 86, 0.28);
  content: "";
  background: #1b1a19;
  transform: rotate(45deg);
}

.guide-dots {
  position: absolute;
  top: 10px;
  right: 20px;
  color: var(--gold);
  letter-spacing: 2px;
}

.guide-card h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

.guide-card p {
  margin: 0 0 20px;
  color: #9b978f;
  font-size: 12px;
  line-height: 1.8;
}

.guide-card > button {
  width: 100%;
  padding: 12px;
  border: 0;
  border-radius: 11px;
  color: #1e1609;
  background: var(--gold);
  cursor: pointer;
  font-weight: 600;
}

.toast {
  position: fixed;
  z-index: 120;
  bottom: 34px;
  left: 50%;
  padding: 10px 18px;
  border: 1px solid rgba(226, 183, 86, 0.22);
  border-radius: 999px;
  color: #e5ded1;
  background: rgba(26, 25, 24, 0.94);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.32);
  font-size: 12px;
  transform: translateX(-50%);
}

@media (max-width: 920px) {
  .page-shell {
    grid-template-columns: 1fr;
    gap: 42px;
    max-width: 660px;
  }

  .hero-copy {
    max-width: 600px;
    text-align: center;
  }

  .hero-copy h1 {
    font-size: clamp(36px, 7.8vw, 52px);
  }

  .hero-subtitle {
    margin-right: auto;
    margin-left: auto;
  }

  .trust-row {
    justify-content: center;
  }

  .download-card {
    min-height: 600px;
  }
}

@media (max-width: 600px) {
  .site-header {
    width: calc(100% - 32px);
    height: 78px;
  }

  .brand img {
    width: 38px;
    height: 38px;
    padding: 4px;
    border-radius: 11px;
  }

  .brand strong { font-size: 17px; }
  .official-badge { padding: 7px 10px; font-size: 10px; }

  .page-shell {
    width: calc(100% - 24px);
    min-height: auto;
    margin-top: 18px;
    padding-bottom: 38px;
  }

  .hero-copy {
    padding: 10px 12px 0;
  }

  .eyebrow {
    margin-bottom: 16px;
    font-size: 8px;
    letter-spacing: 0.18em;
  }

  .hero-copy h1 {
    font-size: clamp(30px, 9vw, 40px);
    line-height: 1.18;
  }

  .hero-subtitle {
    margin-top: 19px;
    font-size: 13px;
    line-height: 1.75;
  }

  .trust-row {
    gap: 14px;
    margin-top: 25px;
    font-size: 10px;
  }

  .download-card {
    min-height: 590px;
    padding: 22px 18px;
    border-radius: 24px;
  }

  .app-icon-wrap {
    width: 62px;
    height: 62px;
    padding: 7px;
    border-radius: 18px;
  }

  .app-identity { gap: 14px; }
  .app-identity h2 { font-size: 20px; }
  .identity-kicker { font-size: 10px; }
  .platform-tabs { margin-top: 22px; }
  .platform-tabs button { gap: 4px; padding: 0 3px; font-size: 10px; }
  .tab-mark { width: 18px; height: 18px; }
  .release-date { display: none; }
  .primary-action { min-height: 56px; }
  .market-list { grid-template-columns: 1fr; }

  .assurance-grid {
    grid-template-columns: 1fr;
    margin-top: 0;
  }

  .assurance-grid article {
    min-height: 126px;
  }

  .site-footer {
    flex-direction: column;
    gap: 13px;
    width: calc(100% - 32px);
    text-align: center;
  }

  .filing-links {
    justify-content: center;
  }
}

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