:root {
  color-scheme: dark;
  --qz-bg: #06080d;
  --qz-surface: #0b1018;
  --qz-card: #0d1420;
  --qz-raised: #111927;
  --qz-text: #f0f3f8;
  --qz-muted: #8b96a8;
  --qz-faint: #5f6a7b;
  --qz-line: rgba(235, 240, 250, 0.12);
  --qz-line-strong: rgba(235, 240, 250, 0.2);
  --qz-coral: #d47769;
  --qz-coral-deep: #b95349;
  --qz-gold: #cca86e;
  --qz-gold-light: #f0d8a8;
}

@media (prefers-color-scheme: light) {
  :root {
    color-scheme: light;
    --qz-bg: #eef1ef;
    --qz-surface: rgba(252, 250, 246, 0.9);
    --qz-card: rgba(248, 246, 241, 0.92);
    --qz-raised: #ffffff;
    --qz-text: #202a30;
    --qz-muted: #65727a;
    --qz-faint: #6b767c;
    --qz-line: rgba(73, 92, 103, 0.16);
    --qz-line-strong: rgba(73, 92, 103, 0.26);
    --qz-coral: #ad4e43;
    --qz-coral-deep: #a7473d;
    --qz-gold: #99713a;
    --qz-gold-light: #7c5c2f;
  }
  body.qz-entry-v4 {
    --tj-ink: #eef1ef;
    --tj-surface: #f8f6f1;
    --tj-surface-glass: rgba(246, 244, 239, 0.92);
    --tj-paper: #243139;
    --tj-muted: #66747d;
    --tj-gold: #8a6734;
  }
}

* { box-sizing: border-box; }
html { background: var(--qz-bg); }
body.qz-entry-v4 {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 17% 10%, rgba(176, 74, 60, 0.08), transparent 27rem),
    radial-gradient(circle at 84% 24%, rgba(62, 112, 128, 0.08), transparent 30rem),
    var(--qz-bg);
  color: var(--qz-text);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea, select { font: inherit; }
a { color: inherit; }

.qz-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  min-height: 68px;
  padding: 10px max(22px, calc((100vw - 1040px) / 2));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--qz-line);
  background: rgba(6, 8, 13, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

@media (prefers-color-scheme: light) {
  .qz-topbar { background: rgba(238, 241, 239, 0.88); box-shadow: 0 10px 34px rgba(44, 55, 60, 0.05); }
  .qz-topbar .tj-brand-mark { filter: brightness(0) saturate(100%) invert(15%) sepia(10%) saturate(950%) hue-rotate(158deg) brightness(92%); }
  .qz-topbar::after {
    content: "";
    position: absolute;
    inset: auto 8% -1px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(153, 113, 58, 0.34), transparent);
  }
  .qz-page-head::before {
    content: "";
    position: absolute;
    width: 210px;
    height: 210px;
    right: 8%;
    top: 74px;
    border: 1px solid rgba(153, 113, 58, 0.1);
    border-radius: 50%;
    box-shadow: 0 0 0 24px rgba(153, 113, 58, 0.025), 0 0 0 58px rgba(71, 111, 125, 0.025);
    pointer-events: none;
  }
  .qz-form { box-shadow: 0 26px 70px rgba(52, 62, 67, 0.1); }
  .qz-scope, .qz-form { backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
  .qz-submit { color: #fff9f7; box-shadow: 0 10px 24px rgba(167, 71, 61, 0.18); }
  .place-preview[data-state="ok"] { color: #3f7d62; }
  .tj-mobile-dock {
    border-color: rgba(73, 92, 103, 0.16);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.84), rgba(244, 243, 239, 0.92));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 16px 40px rgba(43, 55, 62, 0.16);
  }
}
.qz-desktop-nav { display: flex; align-items: center; gap: 8px; }
.qz-desktop-nav a {
  min-height: 40px;
  padding: 8px 13px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--qz-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
}
.qz-desktop-nav a:hover, .qz-desktop-nav a[aria-current="page"] { color: var(--qz-text); background: rgba(240, 243, 248, 0.07); }

.qz-shell { position: relative; width: min(calc(100% - 32px), 860px); margin: 0 auto; padding: 40px 0 72px; }
.qz-page-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 26px; margin-bottom: 24px; }
.qz-page-head p { margin: 0 0 7px; color: var(--qz-coral); font-size: 12px; font-weight: 800; letter-spacing: 0.1em; }
.qz-page-head h1 { margin: 0; font: 700 clamp(30px, 5vw, 44px)/1.15 "Songti SC", "STSong", serif; }
.qz-page-head span { max-width: 660px; margin-top: 9px; display: block; color: var(--qz-muted); }
.qz-page-head > a {
  min-height: 42px;
  padding: 8px 14px;
  display: grid;
  place-items: center;
  border: 1px solid var(--qz-line);
  border-radius: 12px;
  background: var(--qz-surface);
  color: var(--qz-muted);
  text-decoration: none;
  font-weight: 700;
  white-space: nowrap;
}

.qz-scope {
  margin-bottom: 16px;
  padding: 15px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  border: 1px solid var(--qz-line);
  border-radius: 18px;
  background: var(--qz-card);
}
.qz-scope > div { min-width: 0; padding: 11px 12px; border-left: 2px solid rgba(204, 168, 110, 0.55); background: var(--qz-surface); }
.qz-scope strong { display: block; color: var(--qz-gold-light); font-family: "Songti SC", serif; font-size: 16px; }
.qz-scope span { display: block; margin-top: 3px; color: var(--qz-faint); font-size: 11px; }

.qz-form {
  padding: clamp(22px, 5vw, 38px);
  display: grid;
  gap: 24px;
  border: 1px solid var(--qz-line);
  border-radius: 22px;
  background: var(--qz-card);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.3);
}
.qz-form-head { display: flex; align-items: center; gap: 14px; }
.qz-form-head > div:first-child {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(212, 119, 105, 0.32);
  border-radius: 12px;
  background: rgba(212, 119, 105, 0.1);
  color: var(--qz-coral);
  font-family: "Songti SC", serif;
  font-size: 22px;
  font-weight: 800;
}
.qz-form-head h2 { margin: 0; font-size: 22px; }
.qz-form-head p { margin: 4px 0 0; color: var(--qz-muted); font-size: 13px; }
.qz-form-section { display: grid; gap: 14px; }
.qz-form-section + .qz-form-section { padding-top: 24px; border-top: 1px solid var(--qz-line); }
.qz-form-section h3 { margin: 0 0 2px; color: var(--qz-text); font-size: 16px; }
.qz-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.qz-form label { display: grid; gap: 7px; color: var(--qz-muted); font-size: 13px; font-weight: 700; }
.qz-form input:not([type="checkbox"]), .qz-form textarea, .qz-form select {
  width: 100%;
  min-height: 50px;
  padding: 11px 13px;
  border: 1px solid var(--qz-line);
  border-radius: 12px;
  outline: 0;
  background: var(--qz-surface);
  color: var(--qz-text);
}
.qz-form textarea { resize: vertical; }
.qz-form input:focus, .qz-form textarea:focus, .qz-form select:focus { border-color: var(--qz-coral); box-shadow: 0 0 0 3px rgba(212, 119, 105, 0.08); }
.qz-form input::placeholder, .qz-form textarea::placeholder { color: var(--qz-faint); }
.qz-consent { display: flex !important; grid-template-columns: 20px 1fr; align-items: flex-start; gap: 10px !important; font-weight: 500 !important; line-height: 1.65; }
.qz-consent input { width: 19px; height: 19px; margin: 2px 0 0; flex: 0 0 auto; accent-color: var(--qz-coral); }
.qz-consent a { color: var(--qz-gold-light); }
.qz-submit {
  width: 100%;
  min-height: 52px;
  border: 1px solid rgba(212, 119, 105, 0.5);
  border-radius: 13px;
  background: var(--qz-coral-deep);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}
.qz-submit:disabled { opacity: 0.55; cursor: wait; }

.place-preview { display: block; margin-top: -7px; color: var(--qz-faint); font-size: 11px; }
.place-preview[data-state="ok"] { color: #80c9a3; }
.place-preview[data-state="warn"] { color: var(--qz-gold-light); }
.place-search-results { margin-top: -8px; display: grid; gap: 6px; }
.place-result { width: 100%; padding: 11px 13px; display: grid; gap: 2px; border: 1px solid var(--qz-line); border-radius: 10px; background: var(--qz-raised); color: var(--qz-text); text-align: left; cursor: pointer; }
.place-result small { color: var(--qz-faint); }

.qz-result { min-height: 50px; padding: 13px 15px; border-left: 2px solid var(--qz-gold); background: rgba(204, 168, 110, 0.06); color: var(--qz-muted); font-size: 13px; }
.qz-result.empty { color: var(--qz-faint); }
.progress-card { min-height: 96px; display: grid; grid-template-columns: 28px 1fr; align-items: center; gap: 5px 12px; }
.progress-card .spinner { width: 24px; height: 24px; grid-row: span 3; border: 2px solid var(--qz-line); border-top-color: var(--qz-coral); border-radius: 50%; animation: qz-spin 0.8s linear infinite; }
.progress-card strong { color: var(--qz-text); }
.progress-card span, .progress-card small { color: var(--qz-muted); }
@keyframes qz-spin { to { transform: rotate(1turn); } }

.profile-memory { padding: 14px; display: grid; gap: 10px; border: 1px solid var(--qz-line); border-radius: 12px; background: var(--qz-surface); }
.profile-memory strong { color: var(--qz-text); }
.profile-memory small { color: var(--qz-muted); }
.profile-memory-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.profile-memory-actions button, .profile-memory-actions a { min-height: 40px; padding: 8px 12px; border: 1px solid var(--qz-line); border-radius: 10px; background: var(--qz-raised); color: var(--qz-text); text-decoration: none; }

.qz-disclaimer { margin: 14px 4px 0; color: var(--qz-faint); font-size: 11px; text-align: center; }
.qz-footer { width: min(calc(100% - 32px), 860px); margin: 0 auto; padding: 22px 0 36px; display: flex; justify-content: center; gap: 16px; color: var(--qz-faint); font-size: 11px; }
.qz-footer a { color: var(--qz-muted); }

@media (max-width: 780px) {
  .qz-topbar { min-height: 58px; padding: 7px 16px; }
  .qz-desktop-nav { display: none; }
  .qz-shell { width: min(calc(100% - 24px), 860px); padding: 24px 0 32px; }
  .qz-page-head { grid-template-columns: 1fr auto; align-items: start; gap: 12px; }
  .qz-page-head p { font-size: 10px; }
  .qz-page-head h1 { font-size: 29px; }
  .qz-page-head span { font-size: 12px; line-height: 1.7; }
  .qz-page-head > a { min-height: 38px; padding: 6px 10px; font-size: 12px; }
  .qz-scope { grid-template-columns: 1fr 1fr; padding: 10px; gap: 7px; }
  .qz-scope > div { padding: 9px 10px; }
  .qz-form { padding: 20px 16px; gap: 20px; border-radius: 18px; }
  .qz-form-head { align-items: flex-start; }
  .qz-form-head h2 { font-size: 20px; }
  .qz-form-head p { font-size: 12px; }
  .qz-fields { grid-template-columns: 1fr; }
}

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