:root {
  --ink: #181a1f;
  --ink-soft: #343842;
  --muted: #626975;
  --canvas: #f3f5f7;
  --surface: #ffffff;
  --surface-muted: #e9edf1;
  --line: #d9dfe5;
  --accent: #ed7241;
  --accent-strong: #b9471f;
  --accent-soft: #ffe3d5;
  --accent-ink: #24130d;
  --shadow: 0 24px 60px rgba(31, 38, 48, 0.16);
  --max-width: 1180px;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--canvas);
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100dvh;
  background: var(--canvas);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  text-rendering: optimizeLegibility;
}

body.sheet-open {
  overflow: hidden;
}

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

button {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 3px solid rgba(237, 114, 65, 0.55);
  outline-offset: 3px;
}

.site-shell {
  min-height: 100dvh;
}

.topbar {
  width: min(var(--max-width), calc(100% - 40px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
}

.brand-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
}

.brand-name {
  white-space: nowrap;
}

.runtime-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.runtime-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--accent);
}

.runtime-pill[data-context="detecting"] .runtime-dot {
  opacity: 0.45;
}

.hero {
  width: min(var(--max-width), calc(100% - 40px));
  min-height: calc(100dvh - 72px);
  margin: 0 auto;
  padding: 52px 0 64px;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, 0.98fr);
  align-items: center;
  gap: clamp(40px, 7vw, 96px);
}

.hero-copy {
  max-width: 560px;
}

.eyebrow {
  margin: 0 0 18px;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.hero h1 {
  margin: 0;
  font-size: clamp(48px, 6vw, 76px);
  line-height: 0.98;
  font-weight: 780;
  letter-spacing: 0;
}

.hero-lede {
  max-width: 18ch;
  margin: 22px 0 0;
  color: var(--ink-soft);
  font-size: clamp(20px, 2.2vw, 27px);
  line-height: 1.45;
  font-weight: 520;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  min-height: 52px;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-size: 16px;
  font-weight: 720;
  line-height: 1;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, transform 120ms ease;
}

.button:active {
  transform: scale(0.985);
}

.button-primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.button-primary:hover {
  background: #f07b4c;
}

.button-secondary {
  border-color: #cbd2d9;
  background: var(--surface);
  color: var(--ink);
}

.button-secondary:hover {
  border-color: #aeb8c2;
  background: #fbfcfd;
}

.button-symbol {
  font-size: 19px;
  line-height: 1;
}

.hero-meta {
  margin: 15px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.hero-visual {
  position: relative;
  min-height: 472px;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--ink);
  box-shadow: var(--shadow);
  isolation: isolate;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  background: var(--accent);
  z-index: 2;
}

.hero-visual::after {
  content: "";
  position: absolute;
  right: -92px;
  bottom: -104px;
  width: 280px;
  height: 280px;
  border: 52px solid rgba(237, 114, 65, 0.1);
  border-radius: 50%;
  z-index: -1;
}

.shortcut-preview {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 72px 24px 84px;
}

.shortcut-icon {
  width: 176px;
  height: 176px;
  border-radius: 38px;
  object-fit: cover;
  box-shadow: 0 24px 44px rgba(0, 0, 0, 0.32);
}

.shortcut-label {
  margin: 22px 0 0;
  color: #fff;
  font-size: 23px;
  font-weight: 720;
  line-height: 1.2;
}

.shortcut-caption {
  margin: 7px 0 0;
  color: rgba(255, 255, 255, 0.56);
  font-size: 12px;
}

.menu-callout {
  position: absolute;
  right: 18px;
  bottom: 18px;
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 176px;
  padding: 11px 12px;
  border-left: 3px solid var(--accent);
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.menu-key {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 20px;
  font-weight: 800;
}

.menu-copy {
  display: grid;
  gap: 1px;
  line-height: 1.3;
}

.menu-copy strong {
  color: var(--ink);
  font-size: 13px;
}

.menu-copy span {
  color: var(--muted);
  font-size: 12px;
}

.qr-block {
  position: absolute;
  left: 18px;
  bottom: 18px;
  display: grid;
  gap: 6px;
  padding: 8px;
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  text-align: center;
}

.qr-block img {
  width: 82px;
  height: 82px;
  image-rendering: crisp-edges;
}

.steps-band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.steps-inner {
  width: min(var(--max-width), calc(100% - 40px));
  margin: 0 auto;
  padding: 48px 0 34px;
  display: grid;
  grid-template-columns: minmax(190px, 0.72fr) minmax(0, 2.28fr);
  gap: clamp(28px, 5vw, 72px);
}

.section-intro h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: 0;
}

.section-intro p {
  max-width: 28ch;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.steps-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 2px solid var(--ink);
}

.step {
  min-width: 0;
  padding: 19px 18px 4px 0;
}

.step + .step {
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.step-index {
  display: block;
  margin-bottom: 24px;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
}

.step strong {
  display: block;
  font-size: 14px;
  line-height: 1.35;
}

.step p {
  margin: 9px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.inline-symbol {
  display: inline-grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  margin: 0 2px;
  border: 1px solid #f0c6b6;
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  vertical-align: -4px;
}

.shortcut-limit {
  width: min(var(--max-width), calc(100% - 40px));
  margin: 0 auto;
  padding: 0 0 34px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.site-footer {
  width: min(var(--max-width), calc(100% - 40px));
  min-height: 82px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  color: var(--muted);
  font-size: 12px;
}

.site-footer span:first-child {
  color: var(--ink);
  font-weight: 700;
}

.sheet-layer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: end center;
}

.sheet-scrim {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  background: rgba(18, 20, 25, 0.66);
  cursor: default;
}

.install-sheet {
  position: relative;
  width: min(560px, 100%);
  max-height: min(88dvh, 760px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px 24px calc(24px + env(safe-area-inset-bottom));
  border-radius: var(--radius) var(--radius) 0 0;
  background: var(--surface);
  box-shadow: 0 -24px 60px rgba(0, 0, 0, 0.26);
  animation: sheet-up 220ms cubic-bezier(0.2, 0.75, 0.3, 1) both;
}

.sheet-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.sheet-kicker {
  margin: 0 0 5px;
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 800;
}

.sheet-header h2 {
  margin: 0;
  font-size: 26px;
  line-height: 1.25;
}

.icon-button {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--surface-muted);
  color: var(--ink-soft);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.icon-button:hover {
  background: #dfe5ea;
}

.sheet-summary {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.sheet-content {
  margin-top: 16px;
}

.sheet-steps {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.sheet-steps li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.sheet-step-index {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid #efbca7;
  border-radius: 50%;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
}

.sheet-steps strong,
.desktop-install strong,
.notice-block strong {
  display: block;
  font-size: 14px;
}

.sheet-steps p,
.desktop-install p,
.notice-block p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.desktop-install {
  display: grid;
  grid-template-columns: 144px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fafbfc;
}

.desktop-install img {
  width: 144px;
  height: 144px;
}

.notice-block {
  padding: 18px;
  border: 1px solid #efc9ba;
  border-radius: var(--radius);
  background: #fff7f3;
}

.sheet-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 20px;
}

.sheet-actions .button {
  min-height: 50px;
  gap: 14px;
  padding: 0 16px;
}

.copy-status {
  min-height: 18px;
  margin: 9px 0 0;
  color: var(--accent-strong);
  font-size: 12px;
  text-align: right;
}

.sheet-note {
  margin: 3px 0 0;
  color: #7b818a;
  font-size: 11px;
  line-height: 1.55;
}

.noscript-note {
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 120;
  margin: 0;
  padding: 14px;
  border: 1px solid #efc9ba;
  border-radius: var(--radius);
  background: #fff7f3;
  color: var(--ink);
  font-size: 13px;
}

.offline-page {
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--canvas);
}

.offline-shell {
  width: min(440px, 100%);
  text-align: center;
}

.offline-icon {
  width: 88px;
  height: 88px;
  margin: 0 auto 20px;
  border-radius: 20px;
  object-fit: cover;
  box-shadow: 0 16px 34px rgba(31, 38, 48, 0.18);
}

.offline-shell h1 {
  margin: 0;
  font-size: clamp(34px, 9vw, 48px);
  line-height: 1.1;
  letter-spacing: 0;
}

.offline-copy {
  margin: 14px 0 24px;
  color: var(--muted);
}

.offline-action {
  width: min(240px, 100%);
  margin: 0 auto;
}

@keyframes sheet-up {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (min-width: 720px) {
  .sheet-layer {
    place-items: center;
    padding: 24px;
  }

  .install-sheet {
    border-radius: var(--radius);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.32);
  }
}

@media (max-width: 920px) {
  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 34px;
    padding: 40px 0 48px;
  }

  .hero-copy {
    max-width: 620px;
  }

  .hero-lede {
    max-width: none;
  }

  .hero-visual {
    min-height: 356px;
  }

  .shortcut-icon {
    width: 136px;
    height: 136px;
    border-radius: 30px;
  }

  .shortcut-preview {
    padding: 50px 22px 78px;
  }

  .shortcut-label {
    margin-top: 16px;
    font-size: 20px;
  }

  .qr-block {
    display: none;
  }

  .steps-inner {
    grid-template-columns: 1fr;
    gap: 30px;
    padding-top: 38px;
  }

  .steps-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .step:nth-child(3) {
    padding-left: 0;
    border-left: 0;
  }

  .step:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 600px) {
  .topbar,
  .hero,
  .steps-inner,
  .shortcut-limit,
  .site-footer {
    width: min(var(--max-width), calc(100% - 32px));
  }

  .topbar {
    min-height: 64px;
  }

  .brand {
    gap: 8px;
    font-size: 15px;
  }

  .brand-icon {
    width: 36px;
    height: 36px;
    border-radius: 9px;
  }

  .runtime-pill {
    min-height: 30px;
    padding: 4px 9px;
    font-size: 11px;
  }

  .hero {
    padding: 32px 0 38px;
  }

  .eyebrow {
    margin-bottom: 14px;
  }

  .hero h1 {
    font-size: clamp(44px, 13vw, 60px);
  }

  .hero-lede {
    margin-top: 16px;
    font-size: 20px;
  }

  .hero-actions {
    margin-top: 24px;
  }

  .button {
    flex: 1 1 152px;
    min-height: 50px;
    padding: 0 17px;
  }

  .hero-visual {
    min-height: 326px;
  }

  .shortcut-icon {
    width: 118px;
    height: 118px;
    border-radius: 26px;
  }

  .shortcut-preview {
    padding-bottom: 76px;
  }

  .menu-callout {
    right: 14px;
    bottom: 14px;
    min-width: 162px;
    padding: 9px 10px;
  }

  .menu-key {
    width: 31px;
    height: 31px;
  }

  .steps-inner {
    padding: 34px 0 24px;
  }

  .section-intro h2 {
    font-size: 25px;
  }

  .steps-list {
    grid-template-columns: 1fr;
  }

  .step,
  .step + .step,
  .step:nth-child(3) {
    padding: 15px 0;
    border-left: 0;
  }

  .step + .step {
    border-top: 1px solid var(--line);
  }

  .step {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    column-gap: 10px;
  }

  .step-index {
    grid-row: span 2;
    margin: 1px 0 0;
  }

  .step p {
    margin-top: 4px;
  }

  .shortcut-limit {
    padding-bottom: 28px;
  }

  .site-footer {
    min-height: 72px;
    font-size: 11px;
  }

  .install-sheet {
    padding-right: 20px;
    padding-left: 20px;
  }

  .sheet-actions {
    grid-template-columns: 1fr;
  }

  .sheet-actions .button {
    width: 100%;
  }

  .desktop-install {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
}

@media (max-width: 380px) {
  .runtime-pill {
    max-width: 150px;
    overflow: hidden;
  }

  .runtime-pill span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .hero h1 {
    font-size: 42px;
  }

  .button {
    flex-basis: 100%;
  }
}

@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;
  }
}
