:root {
  --ink: #1c1914;
  --paper: #f6f1e6;
  --card: #fffdf8;
  --gold: #b0893a;
  --gold-deep: #8c6a24;
  --navy: #1a2744;
  --muted: #6d6458;
  --line: #e6dcc8;
  --ok: #1f7a57;
  --bad: #b42318;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html, body {
  -webkit-user-select: none;
  user-select: none;
}
input, textarea {
  -webkit-user-select: text;
  user-select: text;
}
body {
  font-family: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", serif;
  font-size: 16px;
  color: var(--ink);
  background: var(--paper);
}

.bg-orb { display: none; }

.shell {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 36px 32px 96px;
}

.page-nav {
  display: flex;
  justify-content: flex-start;
  margin: 0 0 14px;
}
.home-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 4px;
  color: var(--navy);
  text-decoration: none;
  font-size: 15px;
  letter-spacing: .12em;
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}
.home-link::before {
  content: "";
  width: 18px;
  height: 18px;
  border-left: 2px solid var(--gold-deep);
  border-bottom: 2px solid var(--gold-deep);
  transform: rotate(45deg);
  margin-right: 2px;
}
.home-link:hover {
  color: var(--gold-deep);
}

.hero {
  margin: 0 0 24px;
  padding: 36px 36px 40px;
  color: #fffaf0;
  background:
    radial-gradient(1100px 340px at 50% -80px, #32466d 0%, #1a2744 62%);
}
.hero-letterhead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(201, 162, 74, .45);
}
.brand { display: flex; gap: 14px; align-items: center; min-width: 0; }
.brand.compact h1 { font-size: 22px; }
.mark {
  width: 60px; height: 60px; border-radius: 50%;
  display: grid; place-items: center;
  flex: 0 0 60px;
  background: radial-gradient(circle at 35% 30%, #efe0b4, #c9a24a 58%, #8c6a24);
  color: #1a2744;
  font-size: 24px;
  font-weight: 800;
  letter-spacing: .08em;
  box-shadow: 0 0 0 4px rgba(201,162,74,.22), 0 8px 20px rgba(0,0,0,.22);
}
.kicker {
  margin: 0;
  font-size: 13px;
  letter-spacing: .36em;
  color: #efe0b4;
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}
.hero-sign {
  display: grid;
  justify-items: end;
  gap: 6px;
  flex: 0 0 auto;
}
.sign-label {
  font-size: 12px;
  letter-spacing: .28em;
  color: #d4c3a0;
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}
h1 {
  margin: 22px 0 0;
  font-size: 44px;
  letter-spacing: .1em;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.25;
  text-shadow: 0 1px 0 rgba(0,0,0,.25);
}
.hero p {
  margin: 14px 0 0;
  color: #fffaf0;
  font-size: 18px;
  line-height: 1.9;
  max-width: none;
  text-shadow: 0 1px 0 rgba(0,0,0,.22);
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

.status-chip {
  padding: 9px 18px;
  border-radius: 2px;
  background: rgba(201,162,74,.16);
  border: 1px solid #c9a24a;
  font-size: 15px;
  letter-spacing: .12em;
  color: #efe0b4;
  white-space: nowrap;
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}
.status-chip.ready {
  color: #efe0b4;
  background: rgba(201,162,74,.22);
  border-color: #c9a24a;
}

.trust {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 24px;
}
.trust article {
  background: var(--card);
  border: 1px solid var(--line);
  padding: 22px 22px 20px;
  box-shadow: 0 10px 28px rgba(26, 39, 68, .08);
}
.trust b {
  display: block;
  font-size: 18px;
  letter-spacing: .04em;
  margin-bottom: 8px;
}
.trust p {
  margin: 0;
  font-size: 15px;
  line-height: 1.75;
  color: var(--muted);
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
label em { font-style: normal; font-weight: 500; color: var(--muted); float: right; font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif; }

.gate {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  position: relative;
  z-index: 2;
}
.gate-card { width: min(420px, 100%); }
.modal {
  position: fixed; inset: 0; z-index: 8;
  background: rgba(26, 39, 68, .48);
  display: grid; place-items: center;
  padding: 20px;
}
.modal-card { width: min(420px, 100%); display: grid; gap: 12px; }
.modal[hidden], main[hidden] { display: none !important; }
.captcha-row { display: flex; gap: 10px; align-items: center; }
.captcha-img {
  flex: 1;
  height: 56px;
  overflow: hidden;
  background: #f6f1e6;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
}
.captcha-img svg, .captcha-img img { display: block; width: 100%; height: 56px; }
.modal-card h2 { margin: 0; }

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.grid.single { grid-template-columns: minmax(0, 1fr); justify-content: center; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 2px;
  padding: 36px 36px 32px;
  box-shadow: 0 16px 40px rgba(26, 39, 68, .08);
  position: relative;
}
.card::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 3px;
  background: linear-gradient(90deg, #8c6a24, #c9a24a, #efe0b4, #c9a24a, #8c6a24);
}
.card-head { margin-bottom: 22px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.card-head.row { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
h2 { margin: 0; font-size: 24px; letter-spacing: .1em; }
.card-head p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

.form { display: grid; gap: 18px; }
label { display: grid; gap: 7px; }
label span {
  font-size: 15px;
  color: #4a4338;
  font-weight: 650;
  letter-spacing: .04em;
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}
input, textarea, select {
  width: 100%;
  border: 1px solid #ddd4c2;
  background: #fff;
  border-radius: 2px;
  padding: 13px 14px;
  font-size: 16px;
  font: inherit;
  color: inherit;
  outline: none;
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}
textarea { resize: vertical; min-height: 118px; line-height: 1.7; }
input:focus, textarea:focus, select:focus {
  border-color: var(--gold);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(176, 137, 58, .16);
}

.suggest-wrap { position: relative; }
.suggest {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 6;
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 12px 28px rgba(26, 39, 68, .12);
  overflow-x: hidden;
  overflow-y: auto;
  max-height: 240px;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
.suggest button {
  width: 100%;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: #333;
  text-align: left;
  font-weight: 500;
  padding: 10px 14px;
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}
.suggest button:hover,
.suggest button.active { background: #f6f1e6; }
.suggest b { color: #111; font-weight: 650; }
.suggest em { font-style: normal; color: var(--gold-deep); }

.pass-row { display: flex; gap: 8px; }
.pass-row input { flex: 1; }

.advanced { border: 1px dashed var(--line); padding: 10px 12px; background: #fbf7ee; }
.advanced summary { cursor: pointer; color: var(--gold-deep); font-size: 15px; font-weight: 650; }
.adv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 12px; }

.hint {
  margin: 0;
  font-size: 14px;
  color: var(--muted);
  line-height: 1.75;
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}
.scene-block { display: grid; gap: 8px; }
.scene-block > span {
  font-size: 15px;
  color: #4a4338;
  font-weight: 650;
  letter-spacing: .04em;
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}
.scene-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.scene-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 6px;
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 2px;
  padding: 16px 16px 14px;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 6px 16px rgba(26, 39, 68, .06);
  letter-spacing: .06em;
  transition: transform .28s ease, box-shadow .28s ease, border-color .28s ease, background .28s ease, color .28s ease;
}
button.scene-card { border-radius: 2px; }
.scene-card::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 3px;
  background: currentColor;
  opacity: .85;
}
.scene-card .scene-seal {
  position: absolute;
  right: 10px;
  top: 10px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  letter-spacing: 0;
  font-weight: 800;
  opacity: 0;
  transform: scale(.7) rotate(-12deg);
  transition: opacity .28s ease, transform .28s ease;
}
.scene-custom { border-color: #c9a24a; background: #f3e2b8; color: #6b4e16; }
.scene-notice { border-color: #1d4e89; background: #c7d9ef; color: #123047; }
.scene-invoice { border-color: #1f7a57; background: #c5e6d6; color: #146347; }
.scene-welcome { border-color: #b44a63; background: #f0c4ce; color: #7a2438; }
.scene-followup { border-color: #3b4cca; background: #cfd3f3; color: #2f3a68; }
.scene-receipt { border-color: #b42318; background: #f0c4b8; color: #8a1c14; }
.scene-card small {
  font-size: 13px;
  font-weight: 500;
  color: inherit;
  opacity: .78;
  line-height: 1.45;
  letter-spacing: 0;
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}
.scene-custom:hover { background: #edd59a; box-shadow: 0 10px 22px rgba(140, 106, 36, .16); }
.scene-notice:hover { background: #b4cce8; box-shadow: 0 10px 22px rgba(29, 78, 137, .16); }
.scene-invoice:hover { background: #b3ddc8; box-shadow: 0 10px 22px rgba(31, 122, 87, .16); }
.scene-welcome:hover { background: #e9b3c0; box-shadow: 0 10px 22px rgba(180, 74, 99, .16); }
.scene-followup:hover { background: #bdc3ee; box-shadow: 0 10px 22px rgba(59, 76, 202, .16); }
.scene-receipt:hover { background: #e8b0a4; box-shadow: 0 10px 22px rgba(180, 35, 24, .16); }
.scene-card.active {
  color: #fffaf0;
  transform: translateY(-2px);
  box-shadow: 0 14px 28px rgba(26, 39, 68, .2);
}
.scene-card.active::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 20%, rgba(255,250,240,.28) 46%, transparent 72%);
  background-size: 220% 100%;
  animation: sceneShine 2.4s linear infinite;
}
.scene-card.active .scene-seal {
  opacity: 1;
  transform: scale(1) rotate(-12deg);
  background: #c9a24a;
  color: #1a2744;
  box-shadow: 0 0 0 2px rgba(255,250,240,.35);
}
.scene-card.active small { color: #fffaf0; opacity: .88; }
.scene-custom.active { background: linear-gradient(160deg, #8c6a24 0%, #c9a24a 100%); border-color: #efe0b4; }
.scene-notice.active { background: linear-gradient(160deg, #123047 0%, #1d4e89 100%); border-color: #c9a24a; }
.scene-invoice.active { background: linear-gradient(160deg, #146347 0%, #1f7a57 100%); border-color: #c9a24a; }
.scene-welcome.active { background: linear-gradient(160deg, #7a2438 0%, #b44a63 100%); border-color: #c9a24a; }
.scene-followup.active { background: linear-gradient(160deg, #2f3a68 0%, #3b4cca 100%); border-color: #c9a24a; }
.scene-receipt.active { background: linear-gradient(160deg, #8a1c14 0%, #b42318 100%); border-color: #c9a24a; }
@keyframes sceneShine {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}
@media (prefers-reduced-motion: reduce) {
  .scene-card, .scene-card .scene-seal { transition: none; }
  .scene-card.active { transform: none; }
  .scene-card.active::after { animation: none; }
}
.actions { display: flex; gap: 10px; flex-wrap: wrap; }
button {
  border: 0;
  border-radius: 2px;
  padding: 13px 24px;
  font: inherit;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: .12em;
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}
.primary { background: var(--navy); color: #f4ead6; }
.primary:hover { background: #243456; }
.primary:disabled, .ghost:disabled { opacity: .55; cursor: not-allowed; }
.ghost {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}

.history-card { margin-top: 22px; }
.history { display: grid; gap: 12px; }
.history.empty { color: var(--muted); font-size: 15px; font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif; }
.history-more {
  margin: 16px 0 0;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  text-align: center;
  font-size: 14px;
  letter-spacing: .12em;
  color: var(--muted);
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}
.history-more::before {
  content: "···";
  display: block;
  margin-bottom: 8px;
  letter-spacing: .4em;
  color: #c9a24a;
}
.item {
  display: grid;
  grid-template-columns: 148px 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 14px 16px;
  background: #fbf7ee;
  border: 1px solid var(--line);
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}
.item .time { font-size: 13px; color: var(--muted); }
.item .meta { font-size: 16px; }
.item .meta b { font-weight: 650; }
.badge {
  font-size: 13px;
  padding: 5px 9px;
  letter-spacing: .08em;
}
.badge.ok { background: #e8f6ef; color: var(--ok); }
.badge.bad { background: #fff1e8; color: var(--bad); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: var(--navy);
  color: #fff;
  padding: 12px 16px;
  z-index: 9;
  max-width: min(90vw, 520px);
  font-family: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}
.toast.ok { background: var(--ok); }
.toast.bad { background: var(--bad); }

@media (max-width: 980px) {
  .shell { padding: 28px 20px 72px; }
  .hero { padding: 28px 28px 32px; }
}
@media (max-width: 860px) {
  .grid, .adv-grid, .item, .trust { grid-template-columns: 1fr; }
  .page-nav { justify-content: center; }
  .hero { padding: 24px 24px 28px; }
  .hero-letterhead { flex-direction: column; align-items: center; text-align: center; gap: 12px; padding-bottom: 14px; }
  .brand { flex-direction: column; gap: 8px; }
  .hero-sign { justify-items: center; }
  h1 { font-size: 32px; text-align: center; margin-top: 16px; color: #ffffff; }
  .hero p { margin: 10px 0 0; text-align: center; color: #fffaf0; }
  .card { padding: 24px 24px 20px; }
  .trust article { padding: 20px 24px; }
}
@media (max-width: 560px) {
  .scene-grid { grid-template-columns: 1fr 1fr; }
  .scene-card { padding: 10px; }
  .scene-card small { font-size: 12px; }
  .shell { padding: 18px 12px 56px; }
  .hero { padding: 20px 16px 24px; }
  .card { padding: 20px 16px 18px; }
}
@media (min-width: 561px) and (max-width: 860px) {
  .scene-grid { grid-template-columns: 1fr 1fr; }
}
