:root {
  color-scheme: dark;
  --bg: #020a13;
  --surface: #071724;
  --line: #1c3b51;
  --text: #f4f7fa;
  --muted: #91a4b5;
  --green: #00dd86;
  --green-dark: #006f4b;
  --gold: #e7b84d;
  --red: #ff6f7e;
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  background: var(--bg) url('/assets/app-bg.png') center top / cover fixed no-repeat;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  background: rgba(2, 10, 19, 0.87);
  content: '';
}

.shell {
  width: min(calc(100% - 28px), 620px);
  margin: 0 auto;
  padding: max(20px, env(safe-area-inset-top)) 0 max(30px, env(safe-area-inset-bottom));
}

header {
  display: flex;
  align-items: center;
  min-height: 52px;
  margin-bottom: 36px;
}

header img {
  width: 44px;
  height: 44px;
  margin-right: 11px;
  border: 1px solid rgba(231, 184, 77, 0.45);
  border-radius: 7px;
}

header div { display: grid; gap: 2px; }
header strong { font-size: 17px; }
header span { color: var(--muted); font-size: 12px; }

.back {
  display: grid;
  width: 34px;
  height: 40px;
  margin-right: 8px;
  place-items: center;
  color: var(--muted);
  font-size: 34px;
  line-height: 1;
  text-decoration: none;
}

.intro,
.result {
  padding: 28px;
  border: 1px solid var(--line);
  border-top: 2px solid var(--gold);
  border-radius: 8px;
  background: rgba(7, 23, 36, 0.95);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 800;
}

h1 { margin: 0; font-size: 32px; line-height: 1.15; }
.lead { margin: 13px 0 0; color: var(--muted); font-size: 14px; line-height: 1.7; }

.primary,
.secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  border-radius: 7px;
  font-size: 16px;
  font-weight: 800;
  text-decoration: none;
}

.primary {
  width: 100%;
  margin-top: 25px;
  border: 1px solid #12f09a;
  color: #00150d;
  background: var(--green);
}

button.primary { font-family: inherit; cursor: pointer; }
.primary.disabled { border-color: #395062; color: var(--muted); background: #142735; }
.secondary { margin-top: 10px; border: 1px solid var(--line); color: #dce6ed; }
.safari-note { margin: 12px 0 0; color: var(--muted); font-size: 12px; text-align: center; }

.instructions { margin-top: 34px; }
h2 { margin: 0 0 10px; font-size: 19px; }
ol { margin: 0; padding: 0; list-style: none; }
li {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: center;
  min-height: 72px;
  border-bottom: 1px solid rgba(28, 59, 81, 0.75);
  color: #dce6ed;
  font-size: 14px;
  line-height: 1.55;
}

li b {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid var(--green-dark);
  border-radius: 50%;
  color: var(--green);
  font-size: 12px;
}

aside {
  margin-top: 28px;
  padding: 18px 20px;
  border-left: 3px solid var(--gold);
  background: rgba(11, 32, 49, 0.78);
}

aside strong { color: var(--gold); font-size: 14px; }
aside p { margin: 7px 0 0; color: var(--muted); font-size: 13px; line-height: 1.65; }

.result-shell { max-width: 520px; }
.result { text-align: center; }
.success-mark,
.error-mark {
  display: grid;
  width: 54px;
  height: 54px;
  margin: 0 auto 20px;
  place-items: center;
  border: 1px solid var(--green-dark);
  border-radius: 50%;
  color: var(--green);
  font-size: 28px;
  font-weight: 800;
}

.error-mark { border-color: #7e3540; color: var(--red); }
code {
  display: block;
  width: 100%;
  margin-top: 22px;
  padding: 16px 12px;
  overflow-wrap: anywhere;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--green);
  background: #03101a;
  font-size: 14px;
  line-height: 1.55;
  text-align: left;
}

.copy-state { min-height: 20px; margin: 12px 0 0; color: var(--green); font-size: 12px; }

@media (max-width: 480px) {
  header { margin-bottom: 26px; }
  .intro, .result { padding: 23px 18px; }
  h1 { font-size: 28px; }
}
