:root {
  color-scheme: light;
  --page: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #eef4ff;
  --ink: #172033;
  --muted: #667085;
  --line: #dce3ee;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --accent: #0f9f8f;
  --success: #16794b;
  --warning: #9a6700;
  --danger: #b42318;
  --shadow: 0 18px 48px rgba(23, 32, 51, 0.09);
  --radius-large: 26px;
  --radius-medium: 18px;
  --radius-small: 12px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--page);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 0%, rgba(37, 99, 235, 0.12), transparent 28rem),
    radial-gradient(circle at 100% 18%, rgba(15, 159, 143, 0.1), transparent 24rem),
    var(--page);
  -webkit-tap-highlight-color: transparent;
}

button,
a,
input {
  font: inherit;
}

button,
a {
  touch-action: manipulation;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: wait;
  opacity: 0.62;
}

a {
  color: inherit;
}

button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.34);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.page-shell {
  width: min(100% - 32px, 1080px);
  margin: 0 auto;
  padding:
    max(18px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    max(28px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
}

.site-header,
.hero,
.action-grid,
.manual-guide,
.info-strip,
footer {
  animation: rise-in 420ms ease both;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 34px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  color: var(--ink);
  font-weight: 750;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #60a5fa);
  box-shadow: 0 10px 24px rgba(37, 99, 235, 0.24);
  font-size: 25px;
  line-height: 1;
}

.build-tag {
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.66);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  align-items: end;
  margin-bottom: 28px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  max-width: 720px;
  margin-bottom: 14px;
  font-size: clamp(34px, 8vw, 58px);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.hero-description {
  max-width: 650px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
}

.capability-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 74px;
  padding: 17px 18px;
  border: 1px solid rgba(37, 99, 235, 0.13);
  border-radius: var(--radius-medium);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 12px 32px rgba(23, 32, 51, 0.05);
  backdrop-filter: blur(14px);
}

.status-dot {
  flex: 0 0 auto;
  width: 10px;
  height: 10px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.1);
}

.capability-card strong,
.capability-card span {
  display: block;
}

.capability-card strong {
  margin-bottom: 5px;
  font-size: 14px;
}

.capability-card span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.action-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

.action-card {
  position: relative;
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 24px;
  overflow: hidden;
  border: 1px solid rgba(220, 227, 238, 0.92);
  border-radius: var(--radius-large);
  background: var(--surface);
  box-shadow: var(--shadow);
  animation-delay: 70ms;
}

.action-card::after {
  position: absolute;
  top: -60px;
  right: -54px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.055);
  content: "";
  pointer-events: none;
}

.action-card:nth-child(2)::after {
  background: rgba(15, 159, 143, 0.06);
}

.action-icon {
  display: grid;
  width: 52px;
  height: 52px;
  margin-bottom: 22px;
  place-items: center;
  border-radius: 17px;
}

.action-icon svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.bookmark-icon {
  color: var(--primary);
  background: var(--surface-soft);
}

.home-icon {
  color: var(--accent);
  background: #e8f8f5;
}

.action-kicker {
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.action-card h2 {
  margin-bottom: 10px;
  font-size: 24px;
  letter-spacing: -0.025em;
}

.action-card > p:not(.action-kicker) {
  min-height: 52px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.75;
}

.primary-button,
.secondary-button,
.icon-button {
  min-height: 46px;
  border-radius: 13px;
  font-weight: 750;
}

.primary-button {
  width: 100%;
  padding: 13px 18px;
  border: 1px solid var(--primary);
  color: #fff;
  background: var(--primary);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.18);
  transition: transform 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.primary-button:hover {
  background: var(--primary-dark);
  box-shadow: 0 12px 26px rgba(37, 99, 235, 0.24);
}

.primary-button:active,
.secondary-button:active {
  transform: translateY(1px);
}

.accent-button {
  border-color: var(--accent);
  background: var(--accent);
  box-shadow: 0 10px 22px rgba(15, 159, 143, 0.18);
}

.accent-button:hover {
  background: #0b8578;
}

.secondary-button {
  padding: 11px 16px;
  border: 1px solid var(--line);
  color: var(--ink);
  background: #fff;
}

.secondary-button:hover {
  border-color: #b9c6d8;
  background: #f8fafc;
}

.text-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin-top: 8px;
  color: var(--primary);
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: rgba(37, 99, 235, 0.28);
  text-underline-offset: 4px;
}

.manual-guide {
  margin-top: 22px;
  padding: 24px;
  border: 1px solid rgba(37, 99, 235, 0.14);
  border-radius: var(--radius-large);
  background: linear-gradient(180deg, #fff, #f9fbff);
  box-shadow: var(--shadow);
  scroll-margin-top: 18px;
  animation-delay: 120ms;
}

.guide-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.guide-heading h2 {
  margin-bottom: 0;
  font-size: 25px;
}

.guide-notice {
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: var(--radius-small);
  color: #344054;
  background: var(--surface-soft);
  font-size: 14px;
  line-height: 1.65;
}

.guide-notice:empty {
  display: none;
}

.guide-steps {
  display: grid;
  gap: 12px;
  margin: 0 0 22px;
  padding: 0;
  counter-reset: guide-step;
  list-style: none;
}

.guide-steps li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  color: #344054;
  font-size: 14px;
  line-height: 1.7;
  counter-increment: guide-step;
}

.guide-steps li::before {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 10px;
  color: var(--primary);
  background: var(--surface-soft);
  content: counter(guide-step);
  font-size: 13px;
  font-weight: 800;
}

.url-box {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 9px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-medium);
  background: #fff;
}

.url-box label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.url-box input {
  width: 100%;
  min-width: 0;
  min-height: 46px;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: #344054;
  background: #f8fafc;
  font-size: 13px;
}

.guide-tip {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.info-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1px;
  margin-top: 26px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-medium);
  background: var(--line);
  animation-delay: 160ms;
}

.info-strip div {
  padding: 17px 18px;
  background: rgba(255, 255, 255, 0.82);
}

.info-strip strong,
.info-strip span {
  display: block;
}

.info-strip strong {
  margin-bottom: 6px;
  font-size: 13px;
}

.info-strip span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

footer {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
  animation-delay: 200ms;
}

dialog {
  width: min(calc(100% - 32px), 460px);
  max-height: calc(100dvh - 48px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid rgba(220, 227, 238, 0.9);
  border-radius: 24px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 28px 90px rgba(15, 23, 42, 0.24);
}

dialog::backdrop {
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(5px);
}

.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 22px 22px 0;
}

.dialog-header h2 {
  margin-bottom: 0;
  font-size: 23px;
}

.icon-button {
  display: grid;
  width: 44px;
  min-width: 44px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--muted);
  background: #fff;
  font-size: 25px;
  line-height: 1;
}

.dialog-body {
  padding: 18px 22px 22px;
}

.dialog-body p {
  margin-bottom: 0;
  color: #475467;
  font-size: 15px;
  line-height: 1.75;
}

.dialog-indicator {
  width: 42px;
  height: 42px;
  margin-bottom: 16px;
  border-radius: 14px;
  background: var(--surface-soft);
}

.dialog-indicator.loading {
  border: 3px solid #dbe7ff;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 800ms linear infinite;
}

.dialog-indicator.success {
  background: #e9f8ef;
}

.dialog-indicator.warning {
  background: #fff5db;
}

.dialog-indicator.danger {
  background: #ffefed;
}

.dialog-actions {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 10px;
  padding: 16px 22px max(22px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: #fbfcfe;
}

.toast {
  position: fixed;
  z-index: 20;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  left: max(16px, env(safe-area-inset-left));
  width: fit-content;
  max-width: calc(100% - 32px);
  margin: 0 auto;
  padding: 13px 17px;
  border-radius: 13px;
  color: #fff;
  background: #1d2939;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.24);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (min-width: 680px) {
  .page-shell {
    padding-top: max(28px, env(safe-area-inset-top));
  }

  .hero {
    grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.7fr);
  }

  .action-grid,
  .info-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .action-card {
    padding: 30px;
  }

  .manual-guide {
    padding: 30px;
  }

  .url-box {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }

  .url-box label {
    grid-column: 1 / -1;
  }

  footer {
    flex-direction: row;
    justify-content: space-between;
    gap: 20px;
  }
}

@media (min-width: 960px) {
  .info-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --page: #0d1422;
    --surface: #151e2f;
    --surface-soft: #1c2b45;
    --ink: #edf2fb;
    --muted: #a6b2c5;
    --line: #2b3850;
  }

  body {
    background:
      radial-gradient(circle at 8% 0%, rgba(37, 99, 235, 0.18), transparent 28rem),
      radial-gradient(circle at 100% 18%, rgba(15, 159, 143, 0.12), transparent 24rem),
      var(--page);
  }

  .capability-card,
  .info-strip div,
  .manual-guide,
  .url-box,
  dialog,
  .dialog-actions,
  .secondary-button,
  .icon-button {
    background: var(--surface);
  }

  .manual-guide {
    background: linear-gradient(180deg, #151e2f, #111a2a);
  }

  .home-icon {
    background: #123a38;
  }

  .guide-notice,
  .url-box input {
    color: var(--ink);
    background: #101827;
  }

  .dialog-body p,
  .guide-steps li {
    color: #c7d1e0;
  }
}
