:root {
  --ink: #111715;
  --ink-soft: #26302d;
  --paper: #f5f4ef;
  --paper-deep: #e8e7df;
  --white: #ffffff;
  --jade: #176a5d;
  --jade-dark: #0d4c43;
  --cinnabar: #b33a2d;
  --gold: #bf9a4b;
  --gold-soft: #e0cb98;
  --line: #d5d8d2;
  --muted: #68716d;
  --danger: #a42d27;
  --success: #19724f;
  --warning: #9b6815;
  --shadow: 0 18px 50px rgba(17, 23, 21, 0.12);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--paper);
  color: var(--ink);
  font-family: "Noto Sans SC", "Microsoft YaHei", "PingFang SC", sans-serif;
  letter-spacing: 0;
}
button, input { font: inherit; letter-spacing: 0; }
button, a, label[for] { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
svg { width: 18px; height: 18px; stroke-width: 1.8; flex: 0 0 auto; }
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.site-header {
  position: absolute;
  z-index: 10;
  top: 0;
  left: 50%;
  width: min(1180px, calc(100% - 40px));
  min-height: 84px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  color: var(--white);
}
.brand { display: inline-flex; align-items: center; text-decoration: none; }
.brand img {
  width: 130px;
  height: 78px;
  object-fit: contain;
  border: 0;
  background: transparent;
}
.header-link { color: var(--gold-soft); font-size: 14px; text-decoration: none; }
.header-link:hover { color: var(--white); }

.hero {
  position: relative;
  min-height: 650px;
  padding: 158px max(24px, calc((100% - 1180px) / 2)) 98px;
  overflow: hidden;
  background: var(--ink);
  color: var(--white);
}
.hero::before, .hero::after { content: ""; position: absolute; pointer-events: none; }
.hero::before {
  top: 130px;
  right: max(26px, calc((100% - 1180px) / 2));
  width: 190px;
  height: 350px;
  border-top: 1px solid rgba(191, 154, 75, 0.55);
  border-right: 1px solid rgba(191, 154, 75, 0.55);
}
.hero::after { right: 0; bottom: 52px; width: 31%; height: 1px; background: rgba(255, 255, 255, 0.25); }
.eyebrow { margin: 0 0 16px; color: var(--gold-soft); font-size: 13px; font-weight: 700; text-transform: uppercase; }
.eyebrow.dark { color: var(--cinnabar); }
.hero h1 {
  max-width: 800px;
  margin: 0;
  font-family: "STKaiti", "KaiTi", serif;
  font-size: 76px;
  line-height: 1.06;
  font-weight: 700;
}
.hero-offer { margin: 14px 0 0; color: var(--gold-soft); font-family: "STKaiti", "KaiTi", serif; font-size: 32px; font-weight: 700; }
.hero-copy { max-width: 650px; margin: 24px 0 0; color: rgba(255, 255, 255, 0.72); font-size: 16px; line-height: 1.9; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 12px 28px; margin-top: 24px; color: rgba(255, 255, 255, 0.85); font-size: 14px; }
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.button {
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button:focus-visible, .segment:focus-visible, .nav-item:focus-visible, input:focus-visible { outline: 3px solid rgba(191, 154, 75, 0.35); outline-offset: 2px; }
.button:disabled { opacity: 0.55; cursor: not-allowed; }
.button-primary { background: var(--cinnabar); color: var(--white); }
.button-primary:hover:not(:disabled) { background: #992f25; }
.button-ghost { border-color: rgba(255, 255, 255, 0.35); background: transparent; color: var(--white); }
.button-ghost:hover:not(:disabled) { border-color: var(--gold-soft); color: var(--gold-soft); }
.button-secondary { border-color: var(--line); background: var(--white); color: var(--ink); }
.button-danger { background: var(--danger); color: var(--white); }
.button-small { min-height: 34px; padding: 0 12px; font-size: 13px; }
.button-block { width: 100%; }

.section-inner { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.section-inner.narrow { width: min(820px, calc(100% - 40px)); }
.rules-band { padding: 76px 0 84px; background: var(--white); }
.section-heading h2, .notice-band h2 { margin: 0; font-family: "STKaiti", "KaiTi", serif; font-size: 38px; line-height: 1.25; }
.section-heading.centered { text-align: center; }
.steps {
  margin: 44px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  list-style: none;
}
.steps li { min-width: 0; padding: 28px 30px 6px 0; display: grid; grid-template-columns: 52px 1fr; gap: 14px; }
.steps li + li { padding-left: 30px; border-left: 1px solid var(--line); }
.step-number { color: var(--gold); font-family: Georgia, serif; font-size: 21px; }
.steps h3 { margin: 0 0 10px; font-size: 18px; }
.steps p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.8; }

.participation-section { padding: 84px 0 96px; background: var(--paper-deep); }
.activity-tool { margin-top: 38px; border: 1px solid var(--line); border-radius: 8px; background: var(--white); box-shadow: var(--shadow); overflow: hidden; }
.segmented-control { padding: 8px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; background: #eceeea; border-bottom: 1px solid var(--line); }
.segment {
  min-height: 46px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  cursor: pointer;
}
.segment.active { background: var(--white); color: var(--jade-dark); box-shadow: 0 2px 8px rgba(17, 23, 21, 0.08); }
.tool-panel { padding: 34px; }
.form-field + .form-field { margin-top: 24px; }
.form-field label, .field-label { margin-bottom: 9px; display: block; font-size: 14px; font-weight: 700; }
input[type="text"], input[type="password"], input[type="search"] {
  width: 100%;
  height: 46px;
  padding: 0 13px;
  border: 1px solid #bfc5c1;
  border-radius: 6px;
  background: var(--white);
  color: var(--ink);
}
input::placeholder { color: #929995; }
.field-hint { margin: 8px 0 0; color: var(--muted); font-size: 12px; }

.upload-zone {
  min-height: 154px;
  padding: 24px;
  border: 1px dashed #9da9a3;
  border-radius: 8px;
  background: #fafbf9;
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  cursor: pointer;
}
.upload-zone:hover, .upload-zone.dragging { border-color: var(--jade); background: #f1f7f4; }
.upload-zone svg { width: 30px; height: 30px; color: var(--jade); }
.upload-zone strong { color: var(--ink); font-size: 15px; }
.upload-zone span { font-size: 12px; font-weight: 400; }
.upload-zone .upload-limit { color: #b42318; font-size: inherit; font-weight: 700; }
.image-previews { margin-top: 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.image-preview {
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 10px;
}
.image-preview img { width: 58px; height: 48px; object-fit: cover; border-radius: 4px; }
.image-preview span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
.icon-button {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  cursor: pointer;
}
.icon-button:hover { border-color: var(--danger); color: var(--danger); }
.form-message { min-height: 22px; margin-top: 14px; text-align: center; font-size: 13px; }
.form-message.error { color: var(--danger); }
.form-message.success { color: var(--success); }
.input-action { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }

.query-result {
  min-height: 240px;
  margin-top: 28px;
  padding: 32px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.query-result > svg { width: 36px; height: 36px; color: var(--gold); }
.query-result h3 { margin: 14px 0 6px; font-family: "STKaiti", "KaiTi", serif; font-size: 25px; }
.query-result p { max-width: 520px; margin: 8px 0; color: var(--muted); line-height: 1.7; }
.query-result.success { border-color: #9dcbb8; background: #f3faf7; }
.query-result.warning { border-color: #dec78f; background: #fcf9f0; }
.code-box {
  width: min(100%, 490px);
  margin-top: 18px;
  padding: 14px;
  border: 1px solid #9dcbb8;
  border-radius: 6px;
  background: var(--white);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}
.code-box code { min-width: 0; overflow-wrap: anywhere; color: var(--jade-dark); font-family: Consolas, monospace; font-size: 19px; font-weight: 700; }

.notice-band { padding: 80px 0; background: var(--jade-dark); color: var(--white); }
.notice-grid { display: grid; grid-template-columns: 0.8fr 1.8fr; gap: 80px; }
.notice-list { margin: 0; border-top: 1px solid rgba(255, 255, 255, 0.25); }
.notice-list > div { padding: 20px 0; border-bottom: 1px solid rgba(255, 255, 255, 0.18); display: grid; grid-template-columns: 100px 1fr; gap: 18px; }
.notice-list dt { color: var(--gold-soft); font-weight: 700; }
.notice-list dd { margin: 0; color: rgba(255, 255, 255, 0.72); line-height: 1.7; }
.site-footer {
  min-height: 100px;
  padding: 24px max(20px, calc((100% - 1180px) / 2));
  background: #090d0c;
  color: rgba(255, 255, 255, 0.65);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-size: 13px;
}
.site-footer div { display: grid; gap: 5px; }
.site-footer strong { color: var(--white); font-family: "STKaiti", "KaiTi", serif; font-size: 19px; }
.site-footer a { color: var(--gold-soft); text-decoration: none; }
.toast-region { position: fixed; z-index: 100; right: 20px; bottom: 20px; display: grid; gap: 10px; }
.toast {
  width: min(360px, calc(100vw - 40px));
  padding: 14px 16px;
  border-left: 4px solid var(--jade);
  border-radius: 6px;
  background: var(--ink-soft);
  color: var(--white);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.2);
  font-size: 13px;
}
.toast.error { border-left-color: var(--cinnabar); }

@media (max-width: 760px) {
  .site-header { width: calc(100% - 28px); min-height: 72px; }
  .brand img { width: 112px; height: 68px; }
  .header-link { display: none; }
  .hero { min-height: 610px; padding: 128px 20px 76px; }
  .hero::before { top: 112px; right: 16px; width: 95px; height: 230px; }
  .hero h1 { max-width: calc(100% - 62px); font-size: 51px; }
  .hero-offer { max-width: calc(100% - 40px); font-size: 25px; }
  .hero-copy { max-width: calc(100% - 24px); font-size: 14px; }
  .hero-actions .button { flex: 1 1 160px; }
  .rules-band, .participation-section, .notice-band { padding: 58px 0; }
  .section-inner, .section-inner.narrow { width: calc(100% - 28px); }
  .section-heading h2, .notice-band h2 { font-size: 30px; }
  .steps { grid-template-columns: 1fr; }
  .steps li, .steps li + li { padding: 22px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .tool-panel { padding: 22px 16px; }
  .image-previews { grid-template-columns: 1fr; }
  .input-action { grid-template-columns: 1fr; }
  .input-action .button { width: 100%; }
  .query-result { min-height: 220px; padding: 24px 16px; }
  .code-box { grid-template-columns: 1fr; }
  .notice-grid { grid-template-columns: 1fr; gap: 34px; }
  .notice-list > div { grid-template-columns: 1fr; gap: 8px; }
}
