/* 暖阳庄园 · Soleil Maison — codex.bugan.cn 卡密兑换中心 */
:root {
  --sun-bg: #f6efe3;
  --sun-bg-soft: #efe1cf;
  --sun-card: #fff9f0;
  --sun-popover: #fffdf8;
  --sun-text: #3b2b24;
  --sun-text-muted: #756357;
  --sun-border: #dcc8af;
  --sun-primary: #d66f3c;
  --sun-primary-hover: #bd592d;
  --sun-gold: #e3a83b;
  --sun-olive: #718255;
  --sun-olive-soft: #e7ecd9;
  --sun-success: #4f7b57;
  --sun-warning: #b67a28;
  --sun-danger: #ad4e42;
  --sun-link: #975334;
  --sun-shadow: rgba(91, 61, 38, 0.12);
  --sun-footer: #ead9c3;

  --page: var(--sun-bg);
  --surface: var(--sun-card);
  --surface-hover: var(--sun-bg-soft);
  --border: var(--sun-border);
  --input-border: var(--sun-border);
  --text: var(--sun-text);
  --text-secondary: var(--sun-text-muted);
  --primary: var(--sun-primary);
  --primary-hover: var(--sun-primary-hover);
  --secondary: var(--sun-olive);
  --highlight: var(--sun-gold);
  --on-accent: #fff;
  --danger: var(--sun-danger);
  --radius-control: 12px;
  --radius-card: 18px;
  --radius-hero: 22px;
  --max-width: 680px;
  --gutter: 16px;
  --motion: 180ms ease;
  --font: "PingFang SC", "Microsoft YaHei UI", "Segoe UI", system-ui, sans-serif;
  --font-title: Georgia, "Noto Serif SC", "Songti SC", serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  color-scheme: light;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text);
  background: var(--page);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(circle at 12% 4%, rgba(227, 168, 59, 0.18), transparent 34%),
    radial-gradient(circle at 92% 8%, rgba(214, 111, 60, 0.1), transparent 30%),
    linear-gradient(180deg, #fff9f0 0%, #f6efe3 72%);
}

a {
  color: var(--sun-link);
  text-decoration: none;
}

a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

button,
input,
textarea {
  font: inherit;
}

.shell {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}

.glow {
  pointer-events: none;
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.45;
}

.glow-a {
  width: 360px;
  height: 360px;
  top: -100px;
  right: -60px;
  background: radial-gradient(circle, rgba(227, 168, 59, 0.35) 0%, transparent 70%);
}

.glow-b {
  width: 280px;
  height: 280px;
  bottom: 8%;
  left: -50px;
  background: radial-gradient(circle, rgba(214, 111, 60, 0.2) 0%, transparent 70%);
  opacity: 0.35;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  background: rgba(255, 249, 240, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px var(--sun-shadow);
}

.brand {
  justify-self: start;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
}

.brand:hover {
  color: var(--text);
  text-decoration: none;
}

.brand-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.brand-title {
  font-family: var(--font-title);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.brand small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.04em;
  line-height: 1.2;
}

.hero-with-logo {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.hero-logo {
  width: 72px;
  height: 72px;
  object-fit: contain;
  flex-shrink: 0;
  margin-top: 4px;
  display: block;
}

.hero-copy {
  flex: 1;
  min-width: 0;
}

.site-footer {
  margin-top: 48px;
  border-top: 1px solid var(--border);
  background: var(--sun-footer);
}

.site-footer-inner {
  width: min(100% - var(--gutter) * 2, 1120px);
  margin: 0 auto;
  padding: 32px 0 24px;
  display: grid;
  grid-template-columns: 1.4fr repeat(2, 1fr);
  gap: 28px 24px;
}

.site-footer-inner--compact {
  grid-template-columns: 1fr;
  padding: 28px 0 16px;
}

.site-footer-inner--compact .site-footer-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.site-footer-inner--compact .site-footer-logo {
  margin-left: auto;
  margin-right: auto;
}

.site-footer-brand {
  min-width: 0;
}

.site-footer-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  display: block;
  margin-bottom: 12px;
}

.site-footer-tagline {
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--text-secondary);
}

.site-footer-domain {
  margin: 0;
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
}

.site-footer-col h3 {
  margin: 0 0 12px;
  font-family: var(--font-title);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.site-footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-footer-col li + li {
  margin-top: 8px;
}

.site-footer-col a {
  color: var(--text-secondary);
  font-size: 13px;
  text-decoration: none;
}

.site-footer-col a:hover {
  color: var(--primary);
  text-decoration: underline;
}

.site-footer-bottom {
  width: min(100% - var(--gutter) * 2, 1120px);
  margin: 0 auto;
  padding: 14px 0 28px;
  border-top: 1px solid rgba(59, 43, 36, 0.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-secondary);
}

.site-footer-bottom--compact {
  justify-content: center;
  padding-bottom: 24px;
}

.site-footer-links {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.site-footer-links a {
  color: var(--text-secondary);
  font-size: 12px;
  text-decoration: none;
}

.site-footer-links a:hover {
  color: var(--primary);
}

.nav {
  justify-self: center;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.topbar-spacer {
  justify-self: end;
}

.nav button,
.nav a.btn-ghost {
  appearance: none;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background var(--motion), color var(--motion), border-color var(--motion);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.nav button:hover,
.nav a.btn-ghost:hover {
  background: var(--sun-bg-soft);
  color: var(--text);
  text-decoration: none;
}

.nav button.active {
  color: var(--primary-hover);
  border-color: rgba(214, 111, 60, 0.35);
  background: rgba(214, 111, 60, 0.12);
}

.main {
  width: min(100% - var(--gutter) * 2, var(--max-width));
  margin: 0 auto;
  padding: 32px 0 64px;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.hero {
  margin-bottom: 28px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--highlight);
}

.hero h1 {
  margin: 0 0 10px;
  font-family: var(--font-title);
  font-size: clamp(28px, 5vw, 38px);
  line-height: 1.2;
  font-weight: 700;
}

.hero .subtitle {
  margin: 0;
  color: var(--text-secondary);
  font-size: 15px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: 0 10px 32px rgba(91, 61, 38, 0.1);
}

.card h2 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 700;
}

.card .hint {
  margin: 0 0 20px;
  color: var(--text-secondary);
  font-size: 14px;
}

.field {
  margin-bottom: 18px;
}

.field label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 600;
}

.field label span {
  font-weight: 400;
  color: var(--text-secondary);
  margin-left: 6px;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.btn-row .btn {
  flex: 1;
  min-width: 140px;
}

.session-helper {
  padding: 14px 16px;
  margin-bottom: 16px;
  border-radius: var(--radius-control);
  border: 1px solid rgba(113, 130, 85, 0.35);
  background: var(--sun-olive-soft);
  font-size: 14px;
  color: var(--text-secondary);
}

.session-helper p {
  margin: 0 0 8px;
  color: var(--text);
}

.session-helper ol {
  margin: 0;
  padding-left: 20px;
}

.session-helper li {
  margin-bottom: 6px;
}

.session-helper kbd {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 12px;
  font-family: inherit;
}

.input-row {
  display: flex;
  gap: 10px;
}

.input-wrap {
  flex: 1;
  position: relative;
}

input[type="text"],
textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border-radius: var(--radius-control);
  border: 1px solid var(--input-border);
  background: #fff;
  color: var(--text);
  transition: border-color var(--motion), box-shadow var(--motion);
}

textarea {
  min-height: 140px;
  resize: vertical;
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: 13px;
  line-height: 1.5;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(214, 111, 60, 0.15);
}

.btn {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 12px 20px;
  min-height: 48px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--motion), transform var(--motion), opacity var(--motion), box-shadow var(--motion);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  background: linear-gradient(135deg, #e17c46 0%, #d66f3c 58%, #c45d31 100%);
  color: var(--on-accent);
  box-shadow: 0 8px 20px rgba(214, 111, 60, 0.22);
}

.btn-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #e88955 0%, #e17c46 58%, #d66f3c 100%);
  box-shadow: 0 10px 24px rgba(214, 111, 60, 0.28);
}

.btn-secondary {
  background: var(--surface);
  color: var(--secondary);
  border: 1px solid var(--secondary);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--sun-olive-soft);
}

.btn-block {
  width: 100%;
}

.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 24px 0 8px;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  text-align: center;
  padding: 10px 8px;
  border-radius: var(--radius-control);
  border: 1px solid var(--border);
  background: var(--sun-popover);
  font-size: 12px;
  color: var(--text-secondary);
  min-width: 0;
}

.step span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  margin: 0;
  border-radius: 50%;
  background: var(--sun-bg-soft);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
}

.step b {
  display: block;
  font-weight: 650;
  line-height: 1.25;
  min-width: 0;
  max-width: 100%;
  word-break: keep-all;
}

.step.active {
  border-color: rgba(214, 111, 60, 0.45);
  color: var(--text);
  background: rgba(214, 111, 60, 0.08);
}

.step.active span {
  background: var(--primary);
  color: var(--on-accent);
}

.step.done span {
  background: rgba(79, 123, 87, 0.2);
  color: var(--sun-success);
}

.alert {
  padding: 12px 14px;
  border-radius: var(--radius-control);
  font-size: 14px;
  margin-bottom: 16px;
}

.alert-error {
  background: rgba(173, 78, 66, 0.1);
  border: 1px solid rgba(173, 78, 66, 0.35);
  color: var(--danger);
}

.alert-info {
  background: var(--sun-olive-soft);
  border: 1px solid rgba(113, 130, 85, 0.35);
  color: var(--text);
}

.alert-warn {
  background: rgba(227, 168, 59, 0.15);
  border: 1px solid rgba(227, 168, 59, 0.35);
  color: #7a5a18;
}

.summary-grid {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}

.summary-row:last-child {
  border-bottom: none;
}

.summary-row .k {
  color: var(--text-secondary);
}

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(227, 168, 59, 0.2);
  color: #9a6a12;
}

.tag-purple {
  background: var(--sun-olive-soft);
  color: var(--secondary);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  border: 1px solid var(--border);
}

.status-pill.processing {
  color: var(--primary-hover);
  border-color: rgba(214, 111, 60, 0.4);
  background: rgba(214, 111, 60, 0.08);
}

.status-pill.success {
  color: var(--sun-success);
  background: rgba(79, 123, 87, 0.12);
  border-color: rgba(79, 123, 87, 0.35);
}

.status-pill.fail {
  color: var(--danger);
  border-color: rgba(173, 78, 66, 0.35);
  background: rgba(173, 78, 66, 0.08);
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline li {
  position: relative;
  padding: 0 0 16px 20px;
  font-size: 14px;
  color: var(--text-secondary);
}

.timeline li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
}

.timeline li strong {
  display: block;
  color: var(--text);
  margin-bottom: 2px;
}

.privacy {
  display: none;
}

.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(59, 43, 36, 0.35);
  backdrop-filter: blur(6px);
}

.modal-mask[hidden] {
  display: none !important;
}

.modal-card {
  position: relative;
  width: min(100%, 520px);
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 28px 24px 22px;
  border-radius: var(--radius-hero);
  border: 1px solid var(--border);
  background: var(--sun-popover);
  box-shadow: 0 24px 64px rgba(91, 61, 38, 0.18);
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 10px;
  background: var(--sun-bg-soft);
  color: var(--text-secondary);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--text);
  background: var(--border);
}

.modal-brand {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 20px;
  padding-right: 28px;
}

.modal-brand h2 {
  margin: 0 0 4px;
  font-family: var(--font-title);
  font-size: 20px;
}

.modal-sub {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.modal-steps {
  margin: 0 0 16px;
  padding-left: 22px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.65;
}

.modal-steps li {
  margin-bottom: 10px;
}

.modal-steps code {
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(214, 111, 60, 0.08);
  border: 1px solid rgba(214, 111, 60, 0.18);
  color: var(--primary-hover);
  word-break: break-all;
}

.modal-steps kbd {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  font-size: 12px;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
}

.modal-check input {
  accent-color: var(--primary);
}

.help-list {
  margin: 0;
  padding-left: 20px;
  color: var(--text-secondary);
}

.help-list li {
  margin-bottom: 10px;
}

.help-list a {
  font-weight: 600;
}

.panel-step {
  display: none;
}

.panel-step.active {
  display: block;
}

.check-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 16px 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.check-row input {
  margin-top: 4px;
  accent-color: var(--primary);
}

.check-progress {
  margin: 16px 0;
  padding: 14px 16px;
  border-radius: var(--radius-card);
  border: 1px solid rgba(214, 111, 60, 0.3);
  background: rgba(214, 111, 60, 0.06);
}

.check-progress-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--text);
  font-size: 14px;
}

.check-progress-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.check-progress-steps li {
  position: relative;
  padding-left: 22px;
  font-size: 13px;
  color: var(--text-secondary);
  transition: color var(--motion);
}

.check-progress-steps li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--border);
  box-sizing: border-box;
}

.check-progress-steps li.active {
  color: var(--text);
}

.check-progress-steps li.active::before {
  border-color: var(--primary);
  background: rgba(214, 111, 60, 0.25);
  animation: progress-pulse 1.2s ease infinite;
}

.check-progress-steps li.done {
  color: var(--sun-success);
}

.check-progress-steps li.done::before {
  content: "✓";
  display: flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  top: 0.2em;
  left: -1px;
  border: none;
  background: rgba(79, 123, 87, 0.18);
  color: var(--sun-success);
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
}

@keyframes progress-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(214, 111, 60, 0.35);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(214, 111, 60, 0);
  }
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(214, 111, 60, 0.25);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: -3px;
  margin-right: 6px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 640px) {
  .topbar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: 12px var(--gutter);
  }

  .topbar-spacer {
    display: none;
  }

  .brand-title {
    font-size: 15px;
  }

  .hero-with-logo {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .hero-logo {
    width: 64px;
    height: 64px;
    margin-top: 0;
  }

  .eyebrow {
    justify-content: center;
  }

  .nav {
    justify-content: center;
  }

  .input-row {
    flex-direction: column;
  }

  .steps {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .step {
    padding: 12px 10px;
    gap: 6px;
  }

  .site-footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 24px 16px;
  }

  .site-footer-brand {
    grid-column: 1 / -1;
  }

  .site-footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .main {
    padding-top: 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
