:root {
  color-scheme: dark;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #050204;
  color: #fff;
}

* {
  box-sizing: border-box;
}

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

body {
  min-height: 100vh;
  overflow-x: hidden;
  background: #050204;
  letter-spacing: 0;
}

button {
  font: inherit;
  border: 0;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

button:disabled {
  cursor: not-allowed;
}

.page-backdrop {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background: #050204;
}

.page-backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 18%;
  filter: saturate(1.08) contrast(1.04);
}

.page-backdrop::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(5, 2, 4, .88) 0%, rgba(5, 2, 4, .46) 42%, rgba(5, 2, 4, .2) 100%),
    linear-gradient(180deg, rgba(5, 2, 4, .1) 0%, rgba(5, 2, 4, .42) 48%, rgba(5, 2, 4, .96) 100%);
}

.shade {
  position: absolute;
  right: 0;
  left: 0;
  pointer-events: none;
}

.shade.top {
  top: 0;
  height: 150px;
  background: linear-gradient(180deg, rgba(0, 0, 0, .55), transparent);
}

.shade.bottom {
  bottom: 0;
  height: 420px;
  background: linear-gradient(0deg, #050204 0%, rgba(5, 2, 4, .78) 46%, transparent 100%);
}

.download-shell {
  position: relative;
  width: min(100%, 480px);
  min-height: 100vh;
  margin: 0 auto;
  padding: calc(18px + env(safe-area-inset-top)) 16px calc(22px + env(safe-area-inset-bottom));
}

.browser-tip,
.status-card {
  margin-bottom: 12px;
  padding: 13px 14px;
  border: 1px solid rgba(255, 210, 132, .36);
  border-radius: 8px;
  background: rgba(255, 242, 205, .94);
  color: #39120c;
  box-shadow: 0 12px 28px rgba(0, 0, 0, .18);
}

.browser-tip strong,
.browser-tip span {
  display: block;
}

.browser-tip strong {
  margin-bottom: 5px;
  font-size: 16px;
}

.browser-tip span,
.status-card {
  font-size: 13px;
  line-height: 1.55;
}

.hero {
  display: flex;
  min-height: 53vh;
  flex-direction: column;
  justify-content: space-between;
  padding: 6px 0 28px;
}

.brand-row {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  align-items: center;
  gap: 10px;
  padding: 7px 12px 7px 7px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 8px;
  background: rgba(10, 4, 8, .42);
  backdrop-filter: blur(16px);
  box-shadow: 0 16px 36px rgba(0, 0, 0, .26);
}

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  object-fit: cover;
}

.brand-name {
  font-size: 17px;
  font-weight: 900;
  line-height: 1.2;
}

.brand-sub {
  margin-top: 3px;
  color: rgba(255, 225, 183, .86);
  font-size: 12px;
}

.hero-copy {
  width: min(100%, 340px);
  padding-top: 74px;
}

.eyebrow {
  display: inline-flex;
  margin: 0 0 13px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 196, 92, .34);
  border-radius: 8px;
  background: rgba(254, 49, 46, .18);
  color: #ffd18a;
  font-size: 13px;
  font-weight: 900;
}

h1 {
  margin: 0;
  text-shadow: 0 14px 32px rgba(0, 0, 0, .58);
  font-size: clamp(42px, 13vw, 64px);
  line-height: 1.02;
  font-weight: 950;
}

.hero-copy p:last-child {
  margin: 16px 0 0;
  color: rgba(255, 255, 255, .76);
  text-shadow: 0 8px 18px rgba(0, 0, 0, .5);
  font-size: 15px;
  line-height: 1.62;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.hero-tags span {
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, .15);
  border-radius: 8px;
  background: rgba(255, 255, 255, .1);
  color: rgba(255, 255, 255, .84);
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(12px);
}

.action-area {
  display: grid;
  gap: 12px;
}

.panel,
.invite-card {
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 8px;
  background: rgba(16, 7, 12, .74);
  box-shadow: 0 20px 48px rgba(0, 0, 0, .36);
  backdrop-filter: blur(18px);
}

.panel {
  padding: 16px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.panel-head strong,
.panel-head span {
  display: block;
}

.panel-head strong {
  font-size: 18px;
}

.panel-head span {
  margin-top: 4px;
  color: rgba(255, 255, 255, .6);
  font-size: 13px;
}

.icon-button {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, .11);
  color: #fff;
  font-size: 20px;
}

.primary-action,
.install-button,
.route-row,
.invite-card button {
  width: 100%;
  border-radius: 8px;
}

.primary-action {
  min-height: 72px;
  padding: 0 18px;
  background: linear-gradient(135deg, #fe312e, #ff7a44);
  color: #fff;
  text-align: left;
  box-shadow: 0 16px 28px rgba(254, 49, 46, .26);
}

.primary-action span,
.primary-action em {
  display: block;
}

.primary-action span {
  font-size: 18px;
  font-weight: 900;
}

.primary-action em {
  margin-top: 7px;
  overflow: hidden;
  color: rgba(255, 255, 255, .78);
  font-size: 13px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.primary-action:disabled {
  background: rgba(255, 255, 255, .1);
  color: rgba(255, 255, 255, .5);
  box-shadow: none;
}

.install-actions {
  display: grid;
  gap: 12px;
}

.install-button {
  position: relative;
  display: flex;
  min-height: 78px;
  align-items: center;
  gap: 12px;
  padding: 0 15px;
  color: #fff;
  text-align: left;
  background: linear-gradient(135deg, #fe312e, #ff7d4a);
  box-shadow: 0 16px 28px rgba(254, 49, 46, .25);
}

.install-button.ios {
  background: linear-gradient(135deg, #f8b84e, #ff3d77);
}

.install-button.disabled {
  background: rgba(255, 255, 255, .1);
  color: rgba(255, 255, 255, .46);
  box-shadow: none;
}

.button-icon {
  display: grid;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, .96);
  color: #fe312e;
  font-size: 13px;
  font-weight: 950;
}

.button-copy {
  min-width: 0;
  flex: 1;
}

.button-copy strong,
.button-copy em {
  display: block;
}

.button-copy strong {
  font-size: 17px;
  line-height: 1.24;
}

.button-copy em {
  margin-top: 6px;
  overflow: hidden;
  color: rgba(255, 255, 255, .74);
  font-size: 12px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.install-button b {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 8px;
  background: #fff0c2;
  color: #5b120d;
  font-size: 12px;
}

.route-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.route-list:empty {
  display: none;
}

.route-row {
  display: flex;
  min-height: 50px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 14px;
  background: rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .72);
}

.route-row strong {
  min-width: 0;
  overflow: hidden;
  color: #ffe0ad;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invite-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  background: rgba(255, 241, 202, .94);
  color: #35110b;
}

.invite-card span,
.invite-card strong,
.invite-card em {
  display: block;
}

.invite-card span {
  color: rgba(53, 17, 11, .58);
  font-size: 12px;
}

.invite-card strong {
  margin-top: 4px;
  font-size: 26px;
  line-height: 1;
}

.invite-card em {
  margin-top: 6px;
  color: rgba(53, 17, 11, .6);
  font-size: 12px;
  font-style: normal;
  line-height: 1.35;
}

.invite-card button {
  width: 76px;
  height: 40px;
  flex: 0 0 auto;
  background: #fe312e;
  color: #fff;
  font-weight: 900;
}

.trust-line {
  display: flex;
  justify-content: center;
  gap: 12px;
  color: rgba(255, 255, 255, .5);
  font-size: 12px;
}

@media (max-width: 380px) {
  .download-shell {
    padding-right: 12px;
    padding-left: 12px;
  }

  .hero-copy {
    padding-top: 52px;
  }

  .button-icon {
    width: 44px;
    height: 44px;
    flex-basis: 44px;
  }

  .button-copy strong {
    font-size: 16px;
  }
}

@media (min-width: 760px) {
  .page-backdrop img {
    object-position: center 18%;
  }

  .page-backdrop::after {
    background:
      linear-gradient(90deg, rgba(5, 2, 4, .92) 0%, rgba(5, 2, 4, .62) 38%, rgba(5, 2, 4, .18) 100%),
      linear-gradient(180deg, rgba(5, 2, 4, .15) 0%, rgba(5, 2, 4, .24) 52%, rgba(5, 2, 4, .9) 100%);
  }

  .download-shell {
    width: min(100%, 1060px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 26px;
    align-items: end;
    padding-top: calc(32px + env(safe-area-inset-top));
    padding-bottom: calc(36px + env(safe-area-inset-bottom));
  }

  .browser-tip {
    grid-column: 1 / -1;
  }

  .hero {
    min-height: calc(100vh - 90px);
    padding-bottom: 30px;
  }

  .hero-copy {
    width: min(100%, 470px);
    padding-top: 0;
  }

  h1 {
    font-size: clamp(58px, 7vw, 84px);
  }

  .hero-copy p:last-child {
    max-width: 420px;
    font-size: 17px;
  }

  .action-area {
    align-self: end;
    padding-bottom: 10px;
  }
}
