/* FLAP｜逆蝶 — Burn → Cameo (sparse, homepage-aligned) */
:root {
  --danger: #c45c5c;
  --ok: #7dba8a;
}

body.burn-page {
  overflow-x: hidden;
}

/* —— Compact hero —— */
.burn-hero {
  position: relative;
  min-height: clamp(280px, 42vh, 420px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-bottom: 1px solid var(--border);
}

.burn-hero-media {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.burn-hero-bg {
  position: absolute;
  inset: 0;
  background:
    url("../assets/flap_hero_poster.jpg") center 40% / cover no-repeat;
  filter: brightness(0.55) saturate(0.85);
}

.burn-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    var(--overlay-heavy) 0%,
    var(--overlay) 50%,
    rgba(8, 6, 5, 0.35) 100%
  );
  pointer-events: none;
}

.burn-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 6.5rem 2.5rem 3.25rem;
}

.burn-hero .hero-eyebrow {
  opacity: 0;
  animation: fade-up 0.9s var(--ease) 0.1s forwards;
  margin-bottom: 0.9rem;
}

.burn-hero-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.2rem, 5.5vw, 3.6rem);
  letter-spacing: 0.1em;
  line-height: 1.1;
  color: var(--ink);
  margin-bottom: 0.85rem;
  opacity: 0;
  animation: fade-up 0.9s var(--ease) 0.22s forwards;
}

html[lang="zh-CN"] .burn-hero-title {
  letter-spacing: 0.06em;
  font-weight: 500;
}

.burn-hero-hook {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2vw, 1.2rem);
  font-weight: 500;
  font-style: italic;
  letter-spacing: 0.06em;
  line-height: 1.55;
  color: var(--ink-muted);
  max-width: 36rem;
  margin-bottom: 1.35rem;
  opacity: 0;
  animation: fade-up 0.9s var(--ease) 0.34s forwards;
}

html[lang="zh-CN"] .burn-hero-hook {
  font-style: normal;
  font-weight: 400;
  letter-spacing: 0.04em;
  line-height: 1.7;
}

.burn-hero-min {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.3rem 0.5rem;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  opacity: 0;
  animation: fade-up 0.9s var(--ease) 0.46s forwards;
}

.burn-hero-min strong {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: none;
  color: var(--gold-bright);
}

/* —— Sections —— */
.burn-page .section {
  padding: 5.5rem 2.5rem;
}

.burn-page .section-header {
  margin-bottom: 2.5rem;
}

.burn-lead {
  color: var(--ink-muted);
  font-size: 0.95rem;
  line-height: 1.7;
  max-width: 36rem;
  margin-top: 1.1rem;
}

.burn-section--desk {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.burn-section--wall {
  /* atmosphere set in Wall of Ash block */
  background: var(--bg);
}

.burn-section--fine {
  padding-top: 2rem;
  padding-bottom: 1.75rem;
}

/* —— Steps: quiet numbered row —— */
.burn-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem 2.5rem;
}

.burn-step {
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
}

.burn-step::before {
  display: none;
}

.burn-step:hover {
  transform: none;
  box-shadow: none;
  border-color: transparent;
}

.burn-step-num {
  font-family: var(--font-display);
  font-size: 1.35rem;
  letter-spacing: 0.12em;
  color: var(--gold);
  margin-bottom: 0.65rem;
  line-height: 1;
}

.burn-step h3 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  margin-bottom: 0.5rem;
  color: var(--ink);
}

html[lang="zh-CN"] .burn-step h3 {
  letter-spacing: 0.04em;
  font-weight: 500;
}

.burn-step p {
  font-size: 0.88rem;
  color: var(--ink-muted);
  line-height: 1.65;
}

/* —— Min burn: text, not a banner —— */
.min-burn {
  margin-bottom: 2.25rem;
  padding: 0 0 1.5rem;
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  background: none;
}

.min-burn-label {
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--purple-neon);
  margin-bottom: 0.4rem;
}

.min-burn-value {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.8vw, 1.75rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--gold-bright);
  line-height: 1.15;
  margin-bottom: 0.55rem;
}

.min-burn-note {
  font-size: 0.88rem;
  color: var(--ink-muted);
  line-height: 1.6;
  max-width: 40rem;
}

/* —— Desk: no heavy panel —— */
.burn-panel {
  background: none;
  border: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
  overflow: visible;
}

.burn-panel::before {
  display: none;
}

.address-block {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.address-block > label,
.field label,
.tier-label {
  display: block;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-bright);
  margin-bottom: 0.55rem;
}

.address-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: stretch;
}

.address-code {
  flex: 1 1 240px;
  display: block;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 2px;
  padding: 0.95rem 1rem;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.8rem;
  color: var(--ink);
  word-break: break-all;
  line-height: 1.5;
}

.address-hint {
  margin-top: 0.65rem;
  font-size: 0.82rem;
  color: var(--ink-muted);
  line-height: 1.55;
}

.burn-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.25rem;
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  border-radius: 2px;
  color: var(--ink-muted);
  transition: border-color 0.25s, color 0.25s;
  white-space: nowrap;
}

.burn-btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold-bright);
  box-shadow: none;
}

.burn-btn-ghost.is-copied {
  border-color: rgba(125, 186, 138, 0.55);
  color: var(--ok);
}

.burn-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.15rem;
  margin-bottom: 1.15rem;
}

.field-full {
  grid-column: 1 / -1;
}

.field input {
  width: 100%;
  background: var(--bg);
  border: 1px solid rgba(201, 166, 107, 0.28);
  border-radius: 2px;
  padding: 0.9rem 1rem;
  color: var(--ink);
  caret-color: var(--gold-bright);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.25s;
}

.field input::placeholder {
  color: rgba(242, 235, 224, 0.42);
  opacity: 1;
}

.field input:focus {
  border-color: var(--gold);
  box-shadow: none;
}

.tier-field {
  margin-bottom: 1.5rem;
}

.tier-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
}

.tier-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 0.3rem;
  padding: 1rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 2px;
  cursor: pointer;
  transition: border-color 0.25s, background 0.25s;
  min-height: 100%;
}

.tier-card[data-tier="wall"] {
  grid-column: 1 / -1;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 1.1rem;
  row-gap: 0.25rem;
  padding: 1.1rem 1.25rem;
}

.tier-card[data-tier="wall"] .tier-card-eyebrow {
  width: 100%;
}

.tier-card[data-tier="wall"] .tier-card-desc {
  flex: 1 1 14rem;
  max-width: 40rem;
}

.tier-card:hover {
  border-color: rgba(201, 166, 107, 0.4);
  transform: none;
}

.tier-card:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 2px;
}

.tier-card.is-selected {
  border-color: var(--gold);
  background: rgba(201, 166, 107, 0.08);
  box-shadow: none;
}

.tier-card.tier-card-top.is-selected {
  border-color: var(--gold-bright);
  background: rgba(201, 166, 107, 0.1);
  box-shadow: none;
}

.tier-card-eyebrow {
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.tier-card.is-selected .tier-card-eyebrow {
  color: var(--gold);
}

.tier-card-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--ink);
  line-height: 1.2;
}

html[lang="zh-CN"] .tier-card-title {
  letter-spacing: 0.04em;
  font-weight: 500;
}

.tier-card-desc {
  font-size: 0.78rem;
  color: var(--ink-muted);
  line-height: 1.5;
}

/* Submit */
.burn-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 22rem;
  padding: 1rem 1.5rem;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-radius: 2px;
  border: none;
  color: #0a0908;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dim) 100%);
  transition: filter 0.3s, transform 0.3s var(--ease);
}

.burn-submit:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow: 0 6px 24px var(--gold-glow);
}

.burn-submit:disabled {
  opacity: 0.55;
  cursor: wait;
  transform: none;
}

.form-status {
  min-height: 1.35rem;
  margin-top: 1rem;
  font-size: 0.88rem;
  color: var(--ink-muted);
}

.form-status.is-ok {
  color: var(--ok);
}

.form-status.is-error {
  color: #e8a0a0;
}

/* Review cadence — quiet, not a banner */
.burn-review-cadence {
  margin: 0 0 0.85rem;
  max-width: 36rem;
  font-size: 0.82rem;
  line-height: 1.55;
  letter-spacing: 0.02em;
  color: var(--ink-muted);
}

.burn-review-cadence--wall {
  margin: 0.65rem 0 0;
  max-width: 36rem;
}

/* —— Wall of Ash (cinematic) —— */
.burn-section--wall {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 55% at 50% 18%, rgba(201, 166, 107, 0.11) 0%, transparent 62%),
    radial-gradient(ellipse 55% 45% at 82% 72%, rgba(139, 92, 180, 0.09) 0%, transparent 58%),
    radial-gradient(ellipse 40% 35% at 12% 80%, rgba(201, 166, 107, 0.05) 0%, transparent 55%),
    var(--bg);
}

.burn-section--wall::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
  mix-blend-mode: soft-light;
}

.burn-section--wall::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 75% 70% at 50% 45%, transparent 40%, rgba(8, 6, 5, 0.55) 100%);
}

.burn-section--wall > .section-inner {
  position: relative;
  z-index: 1;
}

.wall-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: 1.15rem 1rem;
  align-items: stretch;
}

.wall-grid.is-sparse {
  justify-content: center;
  grid-template-columns: repeat(auto-fit, minmax(200px, 240px));
}

.wall-slot {
  --wall-delay: 0ms;
  min-height: 210px;
  background:
    linear-gradient(165deg, rgba(201, 166, 107, 0.06) 0%, transparent 42%),
    rgba(18, 14, 12, 0.72);
  border: 1px solid rgba(201, 166, 107, 0.18);
  border-radius: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 1.35rem 0.9rem 1.2rem;
  text-align: center;
  opacity: 0;
  transform: translateY(14px);
  animation: wall-rise 0.75s var(--ease) var(--wall-delay) forwards;
  transition:
    border-color 0.3s var(--ease),
    transform 0.35s var(--ease),
    box-shadow 0.35s var(--ease),
    background 0.3s;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25) inset;
}

@keyframes wall-rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.wall-slot:hover {
  border-color: rgba(201, 166, 107, 0.55);
  transform: translateY(-5px);
  box-shadow:
    0 14px 36px rgba(0, 0, 0, 0.45),
    0 0 28px rgba(201, 166, 107, 0.12),
    0 0 0 1px rgba(0, 0, 0, 0.2) inset;
  background:
    linear-gradient(165deg, rgba(201, 166, 107, 0.11) 0%, transparent 48%),
    rgba(22, 17, 14, 0.88);
}

.wall-slot.is-featured {
  min-height: 236px;
  padding-top: 1.55rem;
  border-color: rgba(201, 166, 107, 0.32);
  background:
    linear-gradient(165deg, rgba(201, 166, 107, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 0%, rgba(139, 92, 180, 0.1), transparent 60%),
    rgba(20, 15, 13, 0.82);
}

.wall-slot a.wall-link,
.wall-slot .wall-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  width: 100%;
  color: inherit;
  text-decoration: none;
}

.wall-avatar,
.wall-avatar-fallback {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  border: 1.5px solid rgba(201, 166, 107, 0.35);
  background: var(--bg);
  box-shadow:
    0 0 0 3px rgba(8, 6, 5, 0.55),
    0 0 18px rgba(201, 166, 107, 0.08);
  transition: border-color 0.3s, box-shadow 0.35s var(--ease), transform 0.35s var(--ease);
}

.wall-avatar {
  object-fit: cover;
}

.wall-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 500;
  color: var(--gold-bright);
  letter-spacing: 0.04em;
}

.wall-slot.is-featured .wall-avatar,
.wall-slot.is-featured .wall-avatar-fallback {
  width: 88px;
  height: 88px;
}

.wall-slot:hover .wall-avatar,
.wall-slot:hover .wall-avatar-fallback {
  border-color: var(--gold-bright);
  box-shadow:
    0 0 0 3px rgba(8, 6, 5, 0.5),
    0 0 22px rgba(201, 166, 107, 0.35),
    0 0 40px rgba(139, 92, 180, 0.12);
  transform: scale(1.03);
}

.wall-slot .name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 560;
  color: var(--ink);
  letter-spacing: 0.06em;
  word-break: break-word;
  line-height: 1.25;
  margin-top: 0.15rem;
}

html[lang="zh-CN"] .wall-slot .name {
  letter-spacing: 0.04em;
  font-weight: 500;
}

.wall-slot .x-handle {
  font-size: 0.78rem;
  color: var(--gold-bright);
  letter-spacing: 0.05em;
  text-shadow: 0 0 18px rgba(201, 166, 107, 0.25);
}

.wall-slot .meta {
  font-size: 0.58rem;
  color: var(--ink-dim);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.72;
  margin-top: 0.1rem;
}

.wall-empty {
  margin-top: 2rem;
  max-width: 28rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--ink-muted);
  letter-spacing: 0.04em;
  line-height: 1.65;
  opacity: 0.85;
}

html[lang="zh-CN"] .wall-empty {
  font-style: normal;
  letter-spacing: 0.06em;
}

@media (prefers-reduced-motion: reduce) {
  .wall-slot {
    opacity: 1;
    transform: none;
    animation: none;
  }
  .wall-slot:hover {
    transform: none;
  }
  .wall-slot:hover .wall-avatar,
  .wall-slot:hover .wall-avatar-fallback {
    transform: none;
  }
}

@media (max-width: 720px) {
  .wall-grid {
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 0.9rem;
  }
  .wall-avatar,
  .wall-avatar-fallback {
    width: 68px;
    height: 68px;
  }
  .wall-slot.is-featured .wall-avatar,
  .wall-slot.is-featured .wall-avatar-fallback {
    width: 76px;
    height: 76px;
  }
}

/* —— Fine print —— */
.burn-fineprint {
  padding: 0;
  border-left: 1px solid var(--gold-dim);
  padding-left: 1.25rem;
  background: none;
  font-size: 0.78rem;
  color: var(--ink-dim);
  line-height: 1.75;
}

.burn-fineprint strong {
  color: var(--ink-muted);
  font-weight: 500;
}

.burn-page .footer {
  margin-top: 0;
}

@media (max-width: 900px) {
  .tier-cards {
    grid-template-columns: repeat(2, 1fr);
  }
  .burn-steps {
    grid-template-columns: 1fr;
    gap: 1.75rem;
  }
}

@media (max-width: 720px) {
  .burn-hero-content {
    padding: 5.75rem 1.25rem 2.75rem;
  }
  .burn-page .section {
    padding: 4rem 1.25rem;
  }
  .burn-row {
    grid-template-columns: 1fr;
  }
  .burn-submit {
    max-width: none;
  }
  .burn-section--fine {
    padding-top: 1.25rem;
  }
}

@media (max-width: 480px) {
  .tier-cards {
    grid-template-columns: 1fr;
  }
  .tier-card[data-tier="wall"] {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* Avatar upload */
.avatar-field {
  margin-bottom: 0.25rem;
}

.avatar-upload {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.avatar-preview {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--bg);
  flex: 0 0 auto;
}

.avatar-upload-controls {
  flex: 1 1 220px;
  min-width: 0;
}

.avatar-upload-controls input[type="file"] {
  display: block;
  width: 100%;
  max-width: 28rem;
  padding: 0.65rem 0;
  color: var(--ink);
  font-size: 0.88rem;
  background: transparent;
  border: none;
}

.avatar-upload-controls input[type="file"]::file-selector-button {
  margin-right: 0.85rem;
  padding: 0.55rem 0.95rem;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  border-radius: 2px;
  background: var(--bg);
  color: var(--ink-muted);
  cursor: pointer;
}

.avatar-upload-controls input[type="file"]::file-selector-button:hover {
  border-color: var(--gold);
  color: var(--gold-bright);
}

.avatar-hint {
  margin-top: 0.45rem;
  font-size: 0.82rem;
  color: var(--ink-muted);
  line-height: 1.55;
}

.avatar-meta {
  margin-top: 0.35rem;
  font-size: 0.78rem;
  color: var(--gold);
  min-height: 1.1rem;
}

#avatar-clear {
  margin-top: 0.55rem;
}
