:root {
  color-scheme: dark;
  --ink: #07110e;
  --ink-2: #0d1c17;
  --table-green: #123d31;
  --table-green-2: #1b5a46;
  --felt: #0f2d25;
  --cream: #f5ead4;
  --cream-2: #d7c8aa;
  --muted: #aab9ad;
  --line: rgba(245, 234, 212, .18);
  --line-strong: rgba(245, 234, 212, .34);
  --brass: #d7a348;
  --brick: #bf6854;
  --blue: #7fb4c9;
  --green: #70c296;
  --teal: #70cbbb;
  --shadow: 0 18px 54px rgba(0, 0, 0, .32);
  --header-h: 72px;
  --radius: 14px;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 0%, rgba(215, 163, 72, .18), transparent 30%),
    radial-gradient(circle at 86% 16%, rgba(112, 194, 150, .13), transparent 28%),
    linear-gradient(180deg, var(--ink) 0%, var(--felt) 42%, var(--ink) 100%);
  color: var(--cream);
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

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

button {
  border: 0;
  font: inherit;
  color: inherit;
}

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

.app-shell {
  min-height: 100vh;
  position: relative;
}

.app-shell::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .18;
  background-image:
    linear-gradient(rgba(245, 234, 212, .08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(245, 234, 212, .07) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, #000 0%, transparent 78%);
}

.container {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 200;
  transform: translateY(-160%);
  border-radius: 8px;
  background: var(--cream);
  color: var(--ink);
  padding: 10px 12px;
  font-weight: 800;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  background: rgba(7, 17, 14, .88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}

.nav-wrap {
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--cream);
  color: var(--ink);
  box-shadow: 0 7px 0 rgba(0, 0, 0, .22);
  font-weight: 950;
  letter-spacing: 0;
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-text {
  color: #fff7e8;
  font-size: 18px;
  line-height: 1;
  font-weight: 950;
}

.brand-sub {
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
  letter-spacing: .04em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a,
.nav-service,
.btn,
.download-link,
.support-link,
.code-pill,
.modal-code,
.float-service,
.close-btn {
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background-color .18s ease, color .18s ease;
}

.nav-links a,
.nav-service {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: var(--cream-2);
  padding: 0 12px;
}

.nav-links a:hover,
.nav-service:hover {
  background: rgba(245, 234, 212, .09);
  color: var(--cream);
}

.nav-service {
  border-color: var(--line);
}

.hero-operating {
  min-height: calc(100dvh - var(--header-h));
  display: flex;
  align-items: center;
  padding: clamp(58px, 8vh, 86px) 0 clamp(74px, 10vh, 110px);
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 420px);
  gap: clamp(28px, 6vw, 76px);
  align-items: center;
}

.surface-label,
.section-intro span,
.install-panel > span,
.quick-support > span,
.modal-header span,
.tile-topline span,
.download-link span,
.support-link span,
.code-pill span,
.modal-code span,
.float-service span {
  color: var(--brass);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .06em;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 24px;
  color: var(--cream);
  font-size: clamp(44px, 7vw, 88px);
  line-height: .96;
  letter-spacing: -.035em;
  text-wrap: balance;
}

h2 {
  margin-bottom: 14px;
  color: var(--cream);
  font-size: clamp(30px, 4.5vw, 54px);
  line-height: 1.02;
  letter-spacing: -.025em;
  text-wrap: balance;
}

h3 {
  margin-bottom: 12px;
  color: var(--cream);
  font-size: clamp(24px, 2.4vw, 34px);
  line-height: 1.08;
  letter-spacing: -.015em;
}

.hero-desc,
.section-intro p,
.install-panel p,
.quick-support p,
.support-dock p,
.platform-tile p,
.modal-header p,
.promo-strip p {
  color: var(--cream-2);
  line-height: 1.78;
  text-wrap: pretty;
}

.hero-desc {
  max-width: 66ch;
  margin-bottom: 30px;
  font-size: clamp(16px, 1.7vw, 19px);
}

.hero-actions,
.dock-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 18px;
  font-weight: 850;
}

.btn-primary {
  border-color: transparent;
  background: var(--brass);
  color: #211608;
}

.btn-secondary {
  background: rgba(245, 234, 212, .08);
  color: var(--cream);
}

.btn:hover,
.download-link:hover,
.support-link:hover,
.code-pill:hover,
.modal-code:hover,
.float-service:hover {
  transform: translateY(-1px);
}

.btn:active,
.download-link:active,
.support-link:active,
.code-pill:active,
.modal-code:active,
.float-service:active,
.close-btn:active {
  transform: translateY(1px) scale(.99);
}

.nav-links a:focus-visible,
.nav-service:focus-visible,
.btn:focus-visible,
.download-link:focus-visible,
.support-link:focus-visible,
.code-pill:focus-visible,
.modal-code:focus-visible,
.float-service:focus-visible,
.close-btn:focus-visible {
  outline: 2px solid rgba(215, 163, 72, .78);
  outline-offset: 3px;
}

.support-dock {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(245, 234, 212, .13), rgba(245, 234, 212, .06)),
    rgba(7, 17, 14, .54);
  box-shadow: var(--shadow);
  padding: 24px;
}

.dock-head {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 14px;
  align-items: center;
  margin-bottom: 18px;
}

.dock-head img,
.modal-header img {
  border-radius: 13px;
  background: rgba(245, 234, 212, .08);
}

.dock-head strong {
  display: block;
  margin-top: 3px;
  color: var(--cream);
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: .03em;
}

.support-dock p {
  margin-bottom: 20px;
}

.platform-section,
.guide-section {
  padding: clamp(62px, 9vw, 112px) 0;
}

.section-intro {
  max-width: 760px;
  margin-bottom: 32px;
}

.platform-matrix {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.platform-tile {
  min-height: 390px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(245, 234, 212, .07);
  box-shadow: 0 8px 0 rgba(0, 0, 0, .14);
  padding: 22px;
}

.platform-tile:hover {
  border-color: var(--line-strong);
  background: rgba(245, 234, 212, .10);
}

.tile-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 38px;
}

.tile-topline span {
  display: inline-flex;
  border-radius: 8px;
  background: var(--tile);
  color: var(--ink);
  padding: 6px 9px;
}

.tile-topline em {
  color: var(--cream-2);
  font-size: 13px;
  font-style: normal;
  font-weight: 750;
}

.tone-blue {
  --tile: var(--blue);
}

.tone-green {
  --tile: var(--green);
}

.tone-teal {
  --tile: var(--teal);
}

.tile-note {
  margin-bottom: 24px;
  color: var(--muted);
}

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

.download-link {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(245, 234, 212, .07);
  padding: 14px;
}

.download-link strong {
  color: var(--cream);
  font-size: 15px;
}

.primary-download {
  border-color: rgba(215, 163, 72, .58);
  background: rgba(215, 163, 72, .15);
}

.guide-section {
  background: rgba(7, 17, 14, .36);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
  gap: 18px;
  align-items: stretch;
}

.install-panel,
.quick-support {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(245, 234, 212, .07);
  padding: clamp(22px, 4vw, 32px);
}

.install-steps {
  display: grid;
  gap: 12px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.install-steps li {
  display: grid;
  grid-template-columns: 86px 1fr;
  gap: 16px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.install-steps strong {
  color: var(--brass);
}

.install-steps p {
  margin-bottom: 0;
}

.code-pill {
  width: 100%;
  display: grid;
  gap: 6px;
  margin-top: 22px;
  border: 1px solid rgba(215, 163, 72, .52);
  border-radius: 12px;
  background: rgba(215, 163, 72, .13);
  padding: 16px;
  text-align: left;
}

.code-pill strong,
.modal-code strong {
  color: var(--cream);
  font-size: clamp(32px, 5vw, 48px);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.float-service {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 60;
  display: grid;
  gap: 2px;
  border: 1px solid rgba(7, 17, 14, .18);
  border-radius: 12px;
  background: var(--brass);
  color: var(--ink);
  padding: 10px 14px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, .26);
  text-align: left;
}

.float-service span {
  color: rgba(7, 17, 14, .72);
}

.float-service strong {
  font-size: 15px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.support-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
}

.support-modal.show {
  display: block;
}

.support-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 8, 7, .78);
  backdrop-filter: blur(10px);
}

.support-dialog {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(560px, calc(100% - 28px));
  max-height: calc(100dvh - 28px);
  overflow: auto;
  transform: translate(-50%, -50%);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(245, 234, 212, .13), rgba(245, 234, 212, .06)),
    var(--ink-2);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .52);
  padding: 22px;
}

.close-btn {
  position: absolute;
  right: 14px;
  top: 14px;
  z-index: 2;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(7, 17, 14, .86);
  color: var(--cream);
  font-size: 28px;
  line-height: 1;
}

.modal-header {
  display: grid;
  grid-template-columns: 68px 1fr;
  gap: 14px;
  align-items: start;
  padding-right: 48px;
}

.modal-header h2 {
  margin: 4px 0 8px;
  font-size: clamp(28px, 5vw, 42px);
}

.modal-header p {
  margin-bottom: 0;
}

.promo-strip {
  margin: 22px 0 14px;
  border: 1px solid rgba(215, 163, 72, .42);
  border-radius: 12px;
  background: rgba(215, 163, 72, .12);
  padding: 16px;
}

.promo-strip strong {
  display: block;
  margin-top: 8px;
  color: var(--cream);
  font-size: 24px;
  line-height: 1.2;
}

.promo-strip em {
  color: var(--brass);
  font-size: 36px;
  font-style: normal;
}

.promo-strip p {
  margin: 8px 0 0;
}

.support-actions {
  display: grid;
  gap: 9px;
}

.support-link {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(245, 234, 212, .07);
  padding: 13px 14px;
}

.support-link strong {
  color: var(--cream);
}

.modal-code {
  width: 100%;
  display: grid;
  gap: 6px;
  margin-top: 14px;
  border: 1px solid rgba(112, 194, 150, .52);
  border-radius: 12px;
  background: rgba(112, 194, 150, .11);
  padding: 16px;
  text-align: left;
}

.modal-code em {
  color: var(--green);
  font-style: normal;
  font-weight: 850;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 120;
  transform: translate(-50%, 16px);
  opacity: 0;
  pointer-events: none;
  border-radius: 10px;
  background: var(--cream);
  color: var(--ink);
  padding: 11px 15px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, .32);
  transition: opacity .18s ease, transform .18s ease;
}

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

.site-footer {
  padding: 24px 0 82px;
  color: var(--muted);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

@media (max-width: 900px) {
  :root {
    --header-h: 66px;
  }

  .nav-wrap {
    width: min(100% - 24px, 1180px);
    gap: 12px;
  }

  .brand-sub {
    display: none;
  }

  .nav-links {
    gap: 5px;
  }

  .nav-links a,
  .nav-service {
    min-height: 38px;
    padding: 0 10px;
  }

  .hero-layout,
  .guide-layout {
    grid-template-columns: 1fr;
  }

  .hero-operating {
    min-height: auto;
    padding-top: 48px;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(100% - 26px, 1180px);
  }

  h1 {
    font-size: clamp(42px, 12vw, 60px);
    letter-spacing: -.03em;
  }

  h2 {
    font-size: clamp(30px, 9vw, 42px);
  }

  .hero-actions,
  .dock-actions,
  .download-actions {
    grid-template-columns: 1fr;
  }

  .hero-actions,
  .dock-actions {
    display: grid;
  }

  .platform-tile {
    min-height: auto;
  }

  .install-steps li {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  .modal-header {
    grid-template-columns: 54px 1fr;
    padding-right: 42px;
  }

  .modal-header img {
    width: 54px;
    height: 54px;
  }

  .support-dialog {
    top: max(72px, env(safe-area-inset-top));
    bottom: max(14px, env(safe-area-inset-bottom));
    transform: translateX(-50%);
    max-height: none;
    padding: 18px;
  }

  .float-service {
    right: 13px;
    bottom: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
