/* 声音时光胶囊 · 共享基础样式 */
:root {
  --ink: #070b14;
  --ink-2: #0a1120;
  --night: #0b1220;
  --panel: rgba(18, 27, 44, 0.78);
  --panel-solid: #111a2b;
  --cream: #f7eddb;
  --text: #f2e9da;
  --text-soft: #d8cbb8;
  --muted: #9aa3b5;
  --muted-2: #737e93;
  --gold: #e5c088;
  --gold-bright: #f9e5bd;
  --gold-deep: #b98745;
  --gold-dim: rgba(229, 192, 136, 0.5);
  --line: rgba(229, 192, 136, 0.17);
  --line-soft: rgba(255, 255, 255, 0.07);
  --danger: #e89a86;
  --danger-bg: rgba(232, 154, 134, 0.09);
  --ok: #93c9aa;
  --ok-bg: rgba(147, 201, 170, 0.1);
  --radius-lg: 26px;
  --radius-md: 16px;
  --font-serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "SimSun", serif;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='.6'/></svg>");
  background-size: 180px 180px;
}

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

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

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

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 2px solid rgba(229, 192, 136, 0.85);
  outline-offset: 3px;
}

::selection {
  background: rgba(229, 192, 136, 0.28);
  color: #fff8eb;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 背景 */
.sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(1200px 800px at 82% 8%, rgba(196, 140, 72, 0.12), transparent 60%),
    radial-gradient(1000px 700px at 8% 100%, rgba(52, 79, 124, 0.2), transparent 62%),
    radial-gradient(700px 500px at 24% 12%, rgba(73, 103, 148, 0.12), transparent 60%),
    linear-gradient(160deg, #08101d 0%, #070b14 48%, #05080f 100%);
}

.sky::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.55;
  background-image:
    radial-gradient(1.6px 1.6px at 13% 24%, rgba(255, 240, 210, 0.7), transparent 70%),
    radial-gradient(1.2px 1.2px at 31% 68%, rgba(255, 242, 214, 0.4), transparent 70%),
    radial-gradient(1.8px 1.8px at 57% 18%, rgba(255, 238, 204, 0.55), transparent 70%),
    radial-gradient(1.2px 1.2px at 73% 55%, rgba(255, 244, 220, 0.35), transparent 70%),
    radial-gradient(1.4px 1.4px at 88% 31%, rgba(255, 240, 210, 0.45), transparent 70%),
    radial-gradient(1.1px 1.1px at 41% 87%, rgba(255, 244, 220, 0.28), transparent 70%),
    radial-gradient(1.3px 1.3px at 93% 79%, rgba(255, 240, 210, 0.35), transparent 70%),
    radial-gradient(1px 1px at 66% 93%, rgba(255, 244, 220, 0.25), transparent 70%);
}

.aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
}

.aurora-a {
  width: 40vw;
  height: 40vw;
  right: -8vw;
  top: -10vw;
  background: radial-gradient(circle, rgba(197, 145, 76, 0.2), transparent 65%);
}

.aurora-b {
  width: 38vw;
  height: 38vw;
  left: -10vw;
  bottom: -14vw;
  background: radial-gradient(circle, rgba(55, 87, 134, 0.22), transparent 65%);
}

/* 通用文字 */
.gold-text {
  background: linear-gradient(100deg, #fbeccd 0%, #e7c28a 36%, #bd8a48 68%, #f4d9a8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.kicker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 12px rgba(229, 192, 136, 0.9);
}

.kicker-sep {
  width: 22px;
  height: 1px;
  background: var(--line);
}

/* 卡片 */
.card {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background:
    linear-gradient(160deg, rgba(26, 37, 58, 0.82) 0%, rgba(13, 20, 34, 0.9) 72%);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: radial-gradient(120% 60% at 0% 0%, rgba(229, 192, 136, 0.07), transparent 55%);
}

/* 表单元素 */
.field {
  display: block;
  margin-top: 22px;
}

.field-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 9px;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.06em;
}

.field-hint {
  display: block;
  margin-top: 8px;
  color: var(--muted-2);
  font-size: 12px;
  line-height: 1.5;
}

.field-error {
  display: none;
  margin-top: 8px;
  color: var(--danger);
  font-size: 12.5px;
  line-height: 1.45;
}

.field.has-error .field-error,
.field-error.is-visible {
  display: block;
}

input[type="text"],
input[type="tel"],
input[type="password"],
input[type="number"],
input[type="search"],
select {
  width: 100%;
  min-height: 52px;
  padding: 13px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line-soft);
  background: rgba(5, 9, 17, 0.55);
  color: var(--text);
  font-size: 16px;
  line-height: 1.4;
  appearance: none;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

input::placeholder,
textarea::placeholder {
  color: var(--muted-2);
}

input:focus,
select:focus {
  outline: none;
  border-color: rgba(229, 192, 136, 0.62);
  background: rgba(8, 13, 24, 0.82);
  box-shadow: 0 0 0 3px rgba(229, 192, 136, 0.1);
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text);
  box-shadow: 0 0 0 1000px #0a101d inset;
  transition: background-color 9999s ease-out;
}

.has-error input,
.has-error select {
  border-color: rgba(232, 154, 134, 0.55);
}

/* 按钮 */
.btn-gold {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 50px;
  padding: 0 26px;
  border-radius: 999px;
  border: 1px solid rgba(255, 240, 210, 0.28);
  background: linear-gradient(120deg, #f4dcb2 0%, #e3bd83 45%, #c99a56 100%);
  color: #24180a;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.08em;
  box-shadow: 0 12px 30px rgba(195, 144, 74, 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.55);
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.btn-gold:hover {
  filter: brightness(1.04);
  box-shadow: 0 14px 36px rgba(195, 144, 74, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.btn-gold:active {
  transform: scale(0.985);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.06em;
  transition: border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.btn-ghost:hover {
  border-color: var(--gold-dim);
  color: var(--gold-bright);
  background: rgba(229, 192, 136, 0.06);
}

.link-btn {
  padding: 0;
  color: var(--gold);
  font-size: 13px;
  letter-spacing: 0.03em;
  border-bottom: 1px solid rgba(229, 192, 136, 0.32);
}

.link-btn:hover {
  color: var(--gold-bright);
  border-bottom-color: var(--gold);
}

/* 加载 */
.spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid rgba(229, 192, 136, 0.25);
  border-top-color: var(--gold-bright);
  animation: spin 0.8s linear infinite;
  flex: 0 0 auto;
}

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

/* 提示条 */
.inline-note {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(229, 192, 136, 0.06);
  color: var(--text-soft);
  font-size: 13px;
  line-height: 1.6;
}

.inline-note.is-warning {
  border-color: rgba(232, 154, 134, 0.28);
  background: var(--danger-bg);
  color: #f0c3b7;
}

.inline-note strong {
  color: var(--gold-bright);
  font-weight: 600;
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(26px + var(--safe-bottom));
  z-index: 120;
  max-width: min(88vw, 460px);
  padding: 12px 20px;
  border-radius: 999px;
  border: 1px solid rgba(229, 192, 136, 0.3);
  background: rgba(16, 24, 39, 0.96);
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.5;
  text-align: center;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translate(-50%, 14px);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* 弹层 */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(3, 6, 12, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: fadeIn 0.24s ease both;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* 滚动条（桌面） */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  border-radius: 10px;
  background: rgba(229, 192, 136, 0.2);
  border: 3px solid transparent;
  background-clip: content-box;
}

::-webkit-scrollbar-track {
  background: transparent;
}

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