:root {
  color-scheme: dark;
  font-family: Inter, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: #10100f;
  color: #f5efe7;
  --bg: #10100f;
  --panel: #191816;
  --line: rgba(245, 239, 231, 0.12);
  --muted: #a8a098;
  --accent: #d8c7af;
  --green: #71c6a5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(216, 199, 175, 0.14), transparent 360px),
    linear-gradient(180deg, #151412, #10100f);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

.app {
  width: min(100%, 760px);
  margin: 0 auto;
  padding: 22px 16px 40px;
}

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

.top-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.brand {
  font-size: 1.25rem;
  font-weight: 900;
}

.pill {
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
}

.hero,
.card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(25, 24, 22, 0.94);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
}

.hero {
  padding: 26px 20px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

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

h1 {
  max-width: 660px;
  font-size: clamp(2.45rem, 12vw, 5rem);
  line-height: 1;
}

.lead {
  margin-top: 18px;
  color: #d6cec4;
  font-size: 1rem;
  line-height: 1.65;
}

.notice {
  margin-top: 14px;
  border: 1px solid rgba(113, 198, 165, 0.26);
  border-radius: 10px;
  padding: 12px;
  background: rgba(113, 198, 165, 0.08);
  color: #ccecdf;
  line-height: 1.55;
  font-size: 0.92rem;
}

.progress-panel {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  border: 1px solid rgba(216, 199, 175, 0.22);
  border-radius: 10px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.progress-panel strong {
  color: var(--green);
}

.progress-panel p {
  color: #d6cec4;
  line-height: 1.55;
}

.ops-grid {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.ops-item {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: #151412;
  cursor: pointer;
}

.ops-item.active {
  border-color: rgba(113, 198, 165, 0.48);
  background: rgba(113, 198, 165, 0.08);
}

.ops-item p,
.copy-box {
  color: #d6cec4;
  line-height: 1.55;
  word-break: break-all;
}

.mini-button,
.keyword {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.05);
  color: #f5efe7;
  font-weight: 800;
}

.keyword-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.copy-box {
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: #11100f;
  white-space: pre-wrap;
}

.support-box {
  display: grid;
  gap: 12px;
  margin-top: 16px;
  border: 1px solid rgba(216, 199, 175, 0.22);
  border-radius: 10px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.035);
}

.support-box strong {
  color: var(--green);
}

.support-box p {
  margin-top: 6px;
  color: #d6cec4;
  line-height: 1.55;
}

.support-box img {
  width: min(100%, 240px);
  border-radius: 8px;
  background: #fff;
}

.price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 18px;
}

.price strong {
  color: var(--green);
  font-size: 2.4rem;
}

.actions {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.primary,
.ghost {
  min-height: 48px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-weight: 900;
}

.primary {
  background: var(--accent);
  color: #11100f;
}

.ghost {
  background: rgba(255, 255, 255, 0.04);
  color: #f5efe7;
}

.stack {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.card {
  padding: 18px;
}

.qr-wrap {
  display: grid;
  place-items: center;
  gap: 12px;
  padding: 18px;
  border-radius: 12px;
  background: #fff;
  color: #11100f;
}

.qr-wrap img {
  width: 220px;
  height: 220px;
}

.status {
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.code-box {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.code-box input {
  min-height: 48px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 12px;
  color: #f5efe7;
  background: #11100f;
  outline: none;
  text-transform: uppercase;
}

.settings-form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.settings-form label {
  display: grid;
  gap: 7px;
  color: #d6cec4;
  font-weight: 800;
}

.settings-form input {
  min-height: 48px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 12px;
  color: #f5efe7;
  background: #11100f;
  outline: none;
}

.settings-form input:focus {
  border-color: var(--accent);
}

.guide-grid {
  display: grid;
  gap: 12px;
}

.section-title {
  margin-top: 22px;
  color: var(--accent);
}

.guide-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  background: #151412;
  cursor: pointer;
  transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.guide-item:hover,
.guide-item.active {
  border-color: rgba(216, 199, 175, 0.42);
  background: #1c1a17;
}

.guide-item:active {
  transform: scale(0.995);
}

.guide-item h3 {
  margin-bottom: 8px;
  color: var(--accent);
}

.guide-item p {
  color: #d6cec4;
  line-height: 1.55;
}

.guide-item ol {
  margin: 10px 0 0;
  padding-left: 22px;
  color: #ded5ca;
}

.guide-item li {
  margin: 6px 0;
}

.hint {
  display: inline-block;
  margin-top: 10px;
  color: var(--green);
  font-size: 0.88rem;
  font-weight: 900;
}

.official-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  margin-top: 12px;
  border: 1px solid rgba(216, 199, 175, 0.32);
  border-radius: 8px;
  padding: 0 12px;
  color: #11100f;
  background: var(--accent);
  font-weight: 900;
  text-decoration: none;
}

.official-link:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
}

.done-button {
  width: 100%;
  min-height: 42px;
  margin-top: 12px;
  border: 1px solid rgba(113, 198, 165, 0.42);
  border-radius: 8px;
  background: rgba(113, 198, 165, 0.1);
  color: var(--green);
  font-weight: 900;
}

.detail-block {
  display: grid;
  gap: 6px;
  margin-top: 12px;
}

.detail-block strong {
  color: var(--green);
}

.message {
  margin-top: 12px;
  color: var(--green);
  font-weight: 800;
}

.error {
  color: #f0a0a0;
}

@media (min-width: 640px) {
  .actions,
  .code-box {
    grid-template-columns: 1fr 1fr;
  }

  .ops-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .support-box {
    grid-template-columns: 1fr 220px;
    align-items: center;
  }
}
