:root {
  color-scheme: light;
  --paper: #fffdf8;
  --paper-warm: #fff8ed;
  --canvas: #f8efe1;
  --ink: #3f3027;
  --muted: #756256;
  --line: #ead9bf;
  --orange: #e56f2c;
  --orange-dark: #bd4d18;
  --orange-pale: #fff0dc;
  --teal: #247d72;
  --teal-pale: #e8f4ef;
  --red: #a63e35;
  --red-pale: #fff0ed;
  --focus: #186f91;
  --shadow: 0 18px 55px rgba(82, 55, 34, 0.11);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--canvas);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(rgba(124, 91, 58, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 91, 58, 0.035) 1px, transparent 1px),
    var(--canvas);
  background-size: 28px 28px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  line-height: 1.55;
}

button,
input {
  font: inherit;
}

button,
summary,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

.site-header {
  display: flex;
  width: min(100% - 32px, 1040px);
  min-height: 66px;
  margin: 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 2px solid var(--ink);
  border-radius: 11px 11px 6px 6px;
  color: var(--paper);
  background: var(--orange);
  box-shadow: inset 0 -5px 0 rgba(79, 43, 22, 0.12);
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 16px;
  letter-spacing: 0.04em;
}

.brand small {
  color: var(--muted);
  font-size: 11px;
}

.service-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  border: 1px solid #c8ded6;
  border-radius: 999px;
  color: #27665e;
  background: rgba(244, 251, 248, 0.78);
  font-size: 12px;
  white-space: nowrap;
}

.service-badge i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #3e9b81;
  box-shadow: 0 0 0 3px #d9eee6;
}

.page-shell {
  display: grid;
  width: min(100% - 28px, 1040px);
  margin: 8px auto 0;
  gap: 18px;
}

.activation-card,
.guide-card,
.faq-card {
  border: 1px solid var(--line);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.activation-card {
  position: relative;
  overflow: hidden;
  padding: 24px 18px 20px;
  border-radius: 20px;
}

.ticket-edge {
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  background: repeating-linear-gradient(90deg, var(--orange) 0 24px, #f3b550 24px 48px, var(--teal) 48px 72px);
}

.hero {
  margin-bottom: 18px;
  text-align: center;
}

.eyebrow,
.section-label {
  margin: 0 0 3px;
  color: var(--orange-dark);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 5px;
  font-size: clamp(27px, 8vw, 34px);
  line-height: 1.18;
  letter-spacing: 0.03em;
}

.hero-copy {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
}

.form-step + .form-step {
  margin-top: 17px;
}

.step-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 7px;
}

.step-heading label {
  font-size: 15px;
  font-weight: 750;
}

.step-number {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 7px;
  color: #fff;
  background: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

input {
  display: block;
  width: 100%;
  height: 51px;
  padding: 0 14px;
  border: 1.5px solid #d9c4a7;
  border-radius: 11px;
  outline: none;
  color: var(--ink);
  background: #fffaf1;
  font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.065em;
  text-transform: uppercase;
  transition: border-color 150ms ease, box-shadow 150ms ease, background 150ms ease;
}

input::placeholder {
  color: #a89786;
  font-weight: 500;
  opacity: 1;
}

input:focus-visible {
  border-color: var(--focus);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(24, 111, 145, 0.18);
}

input[aria-invalid="true"] {
  border-color: var(--red);
  background: var(--red-pale);
}

.field-help,
.inline-help p {
  color: var(--muted);
  font-size: 12px;
}

.field-help {
  margin: 6px 2px 0;
}

.inline-help {
  margin: 4px 2px 0;
  color: var(--teal);
  font-size: 12px;
}

.inline-help summary,
.faq-card summary {
  width: fit-content;
  cursor: pointer;
  font-weight: 700;
}

.inline-help p {
  margin: 5px 0 0;
  padding-left: 12px;
  border-left: 2px solid #c6ddd6;
}

.binding-warning {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 17px;
  padding: 10px 11px;
  border-radius: 10px;
  color: #76501f;
  background: #fff4d8;
  font-size: 12px;
}

.binding-warning span {
  display: grid;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #d58a27;
  font-weight: 900;
}

.binding-warning p {
  margin: 0;
}

.form-message {
  display: flex;
  min-height: 44px;
  margin: 8px 0 2px;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  text-align: center;
}

.form-message:empty {
  min-height: 20px;
}

.form-message[data-tone="error"] {
  padding: 8px 10px;
  color: var(--red);
  background: var(--red-pale);
}

.primary-button,
.copy-button {
  width: 100%;
  min-height: 50px;
  border: 0;
  border-radius: 11px;
  font-weight: 800;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.primary-button {
  color: #fff;
  background: var(--orange);
  box-shadow: 0 6px 0 #b94c1d;
  font-size: 16px;
}

.primary-button span {
  display: inline-block;
  margin-right: 6px;
}

.primary-button:hover:not(:disabled) {
  background: #d95e20;
}

.primary-button:active:not(:disabled) {
  transform: translateY(3px);
  box-shadow: 0 3px 0 #b94c1d;
}

.primary-button:disabled {
  cursor: wait;
  color: #7c6858;
  background: #dfd1bd;
  box-shadow: 0 4px 0 #c2b19b;
}

button:focus-visible,
summary:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(24, 111, 145, 0.38);
  outline-offset: 3px;
}

.result-card {
  margin-top: 20px;
  padding: 21px 16px 18px;
  border: 1.5px solid #9bcfc0;
  border-radius: 15px;
  outline: none;
  background: var(--teal-pale);
  text-align: center;
}

.result-card:focus-visible {
  box-shadow: 0 0 0 3px rgba(36, 125, 114, 0.2);
}

.success-icon {
  display: grid;
  width: 36px;
  height: 36px;
  margin: 0 auto 8px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--teal);
  font-size: 20px;
  font-weight: 900;
}

.result-kicker {
  margin-bottom: 2px;
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
}

.result-card h2 {
  margin: 0;
  font-size: 18px;
}

.activation-code {
  display: block;
  margin: 12px 0 14px;
  color: var(--ink);
  font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: clamp(22px, 7vw, 29px);
  font-weight: 900;
  letter-spacing: 0.075em;
  white-space: nowrap;
}

.copy-button {
  min-height: 44px;
  color: #fff;
  background: var(--teal);
  font-size: 14px;
}

.copy-button:hover {
  background: #176b62;
}

.copy-status {
  min-height: 20px;
  margin: 7px 0 0;
  color: var(--teal);
  font-size: 12px;
  font-weight: 700;
}

.copy-status[data-tone="error"] {
  color: var(--red);
}

.next-step {
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px dashed #9bcfc0;
  color: var(--muted);
  font-size: 12px;
  text-align: left;
}

.next-step strong {
  color: var(--ink);
}

.next-step p {
  margin: 3px 0 0;
}

[hidden] {
  display: none !important;
}

.information-column {
  display: grid;
  gap: 18px;
}

.guide-card,
.faq-card {
  padding: 20px 18px;
  border-radius: 16px;
}

.guide-card h2,
.faq-card h2 {
  margin: 0 0 14px;
  font-size: 20px;
}

.guide-steps {
  display: grid;
  margin: 0;
  padding: 0;
  gap: 10px;
  list-style: none;
}

.guide-steps li {
  display: flex;
  align-items: center;
  gap: 11px;
}

.guide-steps li > span {
  display: grid;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid #e6c797;
  border-radius: 50%;
  color: var(--orange-dark);
  background: var(--orange-pale);
  font-size: 12px;
  font-weight: 900;
}

.guide-steps p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.guide-steps strong {
  color: var(--ink);
}

.offline-note {
  margin: 16px 0 0;
  padding: 11px;
  border-left: 3px solid var(--teal);
  border-radius: 0 8px 8px 0;
  color: #4d665f;
  background: #eef7f3;
  font-size: 12px;
}

.faq-card details {
  border-top: 1px solid #eee1ce;
}

.faq-card details:last-child {
  border-bottom: 1px solid #eee1ce;
}

.faq-card summary {
  width: 100%;
  padding: 11px 25px 11px 0;
  color: var(--ink);
  font-size: 13px;
  list-style: none;
  position: relative;
}

.faq-card summary::-webkit-details-marker {
  display: none;
}

.faq-card summary::after {
  content: '+';
  position: absolute;
  right: 2px;
  color: var(--orange-dark);
  font-size: 18px;
  line-height: 1;
}

.faq-card details[open] summary::after {
  content: '−';
}

.faq-card details p {
  margin: -2px 0 12px;
  padding-right: 12px;
  color: var(--muted);
  font-size: 12px;
}

.site-footer {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  color: #887468;
  font-size: 11px;
}

.site-footer span:first-child {
  color: var(--ink);
  font-weight: 750;
}

.clipboard-helper {
  position: fixed;
  top: -1000px;
  left: -1000px;
  opacity: 0;
}

@media (min-width: 680px) {
  .page-shell {
    width: min(100% - 48px, 1040px);
  }

  .activation-card {
    padding: 30px 34px 28px;
  }

  .information-column {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 900px) {
  .site-header {
    min-height: 78px;
  }

  .page-shell {
    grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.8fr);
    align-items: start;
    gap: 24px;
    margin-top: 16px;
  }

  .activation-card {
    padding: 34px 42px 34px;
  }

  .hero {
    margin-bottom: 24px;
  }

  .information-column {
    grid-template-columns: 1fr;
  }

  .guide-card,
  .faq-card {
    padding: 23px 22px;
  }
}

@media (max-width: 359px) {
  .site-header,
  .page-shell {
    width: calc(100% - 20px);
  }

  .site-header {
    min-height: 58px;
  }

  .service-badge {
    padding: 5px 7px;
    font-size: 10px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
  }

  .brand small {
    display: none;
  }

  .activation-card {
    padding: 21px 14px 17px;
    border-radius: 16px;
  }

  .hero {
    margin-bottom: 15px;
  }

  .form-step + .form-step {
    margin-top: 14px;
  }

  input {
    height: 48px;
    font-size: 15px;
  }

  .binding-warning {
    margin-top: 14px;
  }

  .activation-code {
    font-size: 21px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
