:root {
  --bg-top: #1a0f0a;
  --bg-mid: #3b1d12;
  --bg-bottom: #f7efe6;
  --card: rgba(255, 250, 244, 0.96);
  --ink: #2a1810;
  --muted: #7a5a48;
  --line: rgba(140, 90, 55, 0.18);
  --accent: #c45c26;
  --accent-deep: #8f3a12;
  --gold: #d4a017;
  --ok: #1f7a4c;
  --shadow: 0 18px 40px rgba(48, 22, 10, 0.18);
  --radius: 18px;
  --font: "Source Han Sans SC", "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 50% -10%, rgba(212, 160, 23, 0.28), transparent 60%),
    linear-gradient(180deg, var(--bg-top) 0%, var(--bg-mid) 28%, #8a4a2a 48%, var(--bg-bottom) 78%);
}

body {
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-deep); text-decoration: none; }
a:hover { text-decoration: underline; }

.page-shell {
  width: min(100%, 480px);
  margin: 0 auto;
  padding: 16px 16px 48px;
}

.hero {
  border-radius: calc(var(--radius) + 4px);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #2b160f;
  animation: rise-in 0.7s ease both;
}

.hero-poster {
  display: block;
  width: 100%;
  height: auto;
  vertical-align: middle;
}

.hero-fallback {
  min-height: 220px;
  display: grid;
  place-content: center;
  gap: 8px;
  text-align: center;
  padding: 40px 24px;
  background:
    linear-gradient(145deg, rgba(212, 160, 23, 0.35), transparent 45%),
    linear-gradient(180deg, #5a2a16, #2b160f);
  color: #fff8ec;
}

.hero-brand {
  margin: 0;
  font-size: clamp(28px, 8vw, 40px);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.hero-sub {
  margin: 0;
  opacity: 0.85;
  letter-spacing: 0.2em;
}

.notice-card,
.panel,
.promo,
.step-card {
  margin-top: 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  animation: rise-in 0.75s ease both;
}

.notice-card { padding: 18px 16px 16px; animation-delay: 0.05s; }
.panel { padding: 0 0 18px; animation-delay: 0.1s; overflow: hidden; }
.promo { padding: 16px 18px; animation-delay: 0.15s; }

.notice-label {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(196, 92, 38, 0.12);
  color: var(--accent-deep);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.notice-text {
  margin: 12px 0 16px;
  line-height: 1.7;
  color: var(--ink);
  font-size: 14px;
}

.cta-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn {
  appearance: none;
  border: none;
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn:active { transform: translateY(1px) scale(0.99); }
.btn-block { display: block; width: 100%; }
.btn-sm { padding: 8px 12px; font-size: 13px; }

.btn-primary {
  color: #fff8ef;
  background: linear-gradient(135deg, var(--accent), var(--accent-deep));
  box-shadow: 0 10px 22px rgba(143, 58, 18, 0.28);
  text-decoration: none;
}

.btn-outline {
  color: var(--accent-deep);
  background: transparent;
  border: 1.5px solid rgba(143, 58, 18, 0.35);
  text-decoration: none;
}

.btn-ghost {
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  text-decoration: none;
  margin-top: 10px;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: rgba(143, 58, 18, 0.06);
  border-bottom: 1px solid var(--line);
}

.tab {
  border: 0;
  background: transparent;
  padding: 14px 10px;
  font: inherit;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  position: relative;
}

.tab.is-active {
  color: var(--accent-deep);
}

.tab.is-active::after {
  content: "";
  position: absolute;
  left: 18%;
  right: 18%;
  bottom: 0;
  height: 3px;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(90deg, var(--gold), var(--accent));
}

.tab-pane {
  display: none;
  padding: 18px 16px 0;
}

.tab-pane.is-active { display: block; }

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  font-size: 13px;
  color: var(--muted);
}

.field input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font: inherit;
  color: var(--ink);
  background: #fff;
  outline: none;
}

.field input:focus {
  border-color: rgba(196, 92, 38, 0.55);
  box-shadow: 0 0 0 3px rgba(196, 92, 38, 0.12);
}

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

.promo-list li {
  position: relative;
  padding-left: 28px;
  line-height: 1.65;
  font-size: 14px;
  color: var(--ink);
}

.promo-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(31, 122, 76, 0.12);
  color: var(--ok);
  font-size: 12px;
  font-weight: 800;
}

.modal[hidden] { display: none !important; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: end center;
  padding: 16px;
}

.modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(20, 10, 6, 0.55);
  backdrop-filter: blur(2px);
}

.modal-card {
  position: relative;
  width: min(100%, 420px);
  background: #fffaf4;
  border-radius: 22px 22px 16px 16px;
  padding: 22px 18px 16px;
  box-shadow: var(--shadow);
  animation: sheet-up 0.28s ease both;
}

.modal-card h2 {
  margin: 0 0 10px;
  font-size: 22px;
  text-align: center;
}

.success-rank,
.query-lead,
.hint {
  margin: 0 0 14px;
  line-height: 1.7;
  color: var(--ink);
  font-size: 14px;
}

.success-rank strong {
  color: var(--accent-deep);
  font-size: 1.15em;
}

.hint {
  color: var(--muted);
  background: rgba(196, 92, 38, 0.06);
  border-radius: 12px;
  padding: 10px 12px;
}

.kv {
  margin: 0 0 14px;
  display: grid;
  gap: 10px;
}

.kv > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(143, 58, 18, 0.04);
}

.kv dt {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.kv dd {
  margin: 0;
  font-weight: 700;
  text-align: right;
  word-break: break-all;
}

.toast[hidden] { display: none !important; }
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 80;
  max-width: min(90vw, 360px);
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(32, 18, 12, 0.9);
  color: #fff8ef;
  font-size: 13px;
  box-shadow: var(--shadow);
}

.download-shell { padding-top: 24px; }
.back-link {
  display: inline-block;
  margin-bottom: 18px;
  color: #f7e7d4;
  text-decoration: none;
  font-size: 14px;
}

.download-title {
  margin: 0;
  color: #fff7ea;
  font-size: clamp(26px, 7vw, 34px);
  letter-spacing: 0.04em;
}

.download-lead {
  margin: 10px 0 8px;
  color: rgba(255, 247, 234, 0.82);
  line-height: 1.6;
}

.step-card {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 12px;
  padding: 18px 16px;
  animation-delay: 0.08s;
}

.step-no {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 800;
  color: #fff8ef;
  background: linear-gradient(135deg, var(--gold), var(--accent));
}

.step-body h2 {
  margin: 0 0 6px;
  font-size: 17px;
}

.step-body p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
}

.copy-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 12px;
  background: rgba(143, 58, 18, 0.05);
  border: 1px dashed rgba(143, 58, 18, 0.25);
}

.copy-value {
  flex: 1;
  font-weight: 700;
  word-break: break-all;
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

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

@media (min-width: 768px) {
  .modal { place-items: center; }
  .modal-card { border-radius: 18px; }
}
