:root {
  --ink: #061426;
  --ink-soft: #0a2038;
  --ink-card: rgba(8, 31, 54, 0.92);
  --gold: #d8ac52;
  --gold-soft: #f0d690;
  --cream: #f8f3e8;
  --muted: #aebdcd;
  --line: rgba(223, 181, 91, 0.28);
  --white-line: rgba(255, 255, 255, 0.09);
  --shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--cream);
  background:
    radial-gradient(circle at 82% 5%, rgba(201, 155, 75, 0.14), transparent 25rem),
    radial-gradient(circle at 12% 65%, rgba(27, 81, 117, 0.25), transparent 35rem),
    linear-gradient(145deg, #04101f, #071a2e 54%, #061426);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  line-height: 1.6;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.32;
  background-image:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
}

button, textarea { font: inherit; }
button { -webkit-tap-highlight-color: transparent; }

.page-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  position: relative;
}

.site-header {
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 13px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid var(--gold);
  color: var(--gold-soft);
  font-family: "STSong", "SimSun", serif;
  font-size: 24px;
  background: rgba(216, 172, 82, .08);
  box-shadow: inset 0 0 0 5px rgba(216, 172, 82, .05);
}

.brand strong, .brand small { display: block; }
.brand strong { letter-spacing: .13em; font-size: 17px; }
.brand small { color: var(--muted); letter-spacing: .24em; font-size: 11px; }

.status-pill {
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 999px;
  padding: 7px 13px;
  color: #cbd8e4;
  font-size: 12px;
  background: rgba(255,255,255,.035);
}

.status-pill span {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
  background: #54cf91;
  box-shadow: 0 0 12px #54cf91;
}

.hero {
  text-align: center;
  padding: 80px 20px 58px;
  position: relative;
}

.hero::before {
  content: "";
  position: absolute;
  top: 16px;
  left: 50%;
  width: 560px;
  height: 280px;
  transform: translateX(-50%);
  border: 1px solid rgba(216, 172, 82, .12);
  border-radius: 50%;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
  pointer-events: none;
}

.eyebrow, .section-kicker {
  color: var(--gold-soft);
  font-size: 13px;
  letter-spacing: .2em;
}

.hero h1 {
  margin: 16px 0 18px;
  font-family: "STKaiti", "KaiTi", "Microsoft YaHei", serif;
  font-size: clamp(50px, 7vw, 86px);
  line-height: 1.08;
  letter-spacing: .04em;
}

.hero h1 em {
  color: var(--gold-soft);
  font-style: normal;
}

.hero p {
  max-width: 760px;
  margin: 0 auto;
  color: var(--muted);
  font-size: 17px;
}

.workspace { margin-bottom: 68px; }

.mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0 auto 14px;
}

.mode-tab {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 80px;
  padding: 15px 18px;
  color: #c3d0dc;
  border: 1px solid var(--white-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .03);
  text-align: left;
  cursor: pointer;
  transition: .2s ease;
}

.mode-tab:hover { border-color: rgba(216, 172, 82, .5); transform: translateY(-2px); }
.mode-tab.active { color: var(--cream); border-color: var(--gold); background: linear-gradient(135deg, rgba(216,172,82,.14), rgba(255,255,255,.035)); }

.tab-number { color: var(--gold); font-family: Georgia, serif; font-size: 13px; }
.mode-tab strong, .mode-tab small { display: block; }
.mode-tab strong { font-size: 17px; }
.mode-tab small { color: #8497aa; font-size: 12px; }

.editor-card, .result-section {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(11, 37, 62, .95), rgba(5, 23, 42, .97));
  box-shadow: var(--shadow);
}

.editor-card { padding: 30px; }

.editor-heading, .result-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.editor-heading h2, .result-heading h2 {
  margin: 2px 0 0;
  font-size: 23px;
  letter-spacing: .03em;
}

.counter { color: #7f93a6; font-size: 12px; }
.counter b { color: var(--gold-soft); }

textarea {
  display: block;
  width: 100%;
  min-height: 230px;
  resize: vertical;
  padding: 21px 22px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 11px;
  outline: none;
  color: #edf2f6;
  background: rgba(1, 12, 25, .62);
  font-size: 16px;
  line-height: 1.85;
  transition: border-color .2s, box-shadow .2s;
}

textarea::placeholder { color: #718396; }
textarea:focus { border-color: rgba(216,172,82,.72); box-shadow: 0 0 0 3px rgba(216,172,82,.09); }

.quick-examples {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 15px 0 26px;
  color: #8193a6;
  font-size: 12px;
}

.quick-examples button {
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 999px;
  padding: 6px 10px;
  color: #aebdcb;
  background: rgba(255,255,255,.035);
  cursor: pointer;
}

.quick-examples button:hover { color: var(--gold-soft); border-color: rgba(216,172,82,.4); }

.editor-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.editor-actions p { margin: 0; color: #7f93a6; font-size: 12px; }
.shield { display: inline-grid; place-items: center; width: 18px; height: 18px; margin-right: 5px; border-radius: 50%; color: #65d49a; background: rgba(101,212,154,.1); }

.generate-button {
  min-width: 185px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  padding: 0 22px;
  border: 1px solid #edcc7d;
  border-radius: 9px;
  color: #071426;
  background: linear-gradient(135deg, #f2d994, #c99842);
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 34px rgba(197, 145, 54, .2);
}

.generate-button:hover { filter: brightness(1.05); transform: translateY(-1px); }
.generate-button:disabled { cursor: wait; opacity: .72; transform: none; }
.button-arrow { font-family: Georgia, serif; font-size: 22px; }

.result-section { padding: 30px; margin: 0 0 68px; scroll-margin-top: 20px; }
.result-section[hidden] { display: none; }

.result-actions { display: flex; gap: 8px; }
.result-actions button {
  border: 1px solid rgba(216,172,82,.45);
  border-radius: 8px;
  padding: 8px 13px;
  color: var(--gold-soft);
  background: rgba(216,172,82,.06);
  cursor: pointer;
  font-size: 13px;
}

.result-content {
  min-height: 160px;
  padding: 28px;
  border-radius: 11px;
  color: #e9eef3;
  background: rgba(2, 14, 27, .64);
  white-space: pre-wrap;
  font-size: 16px;
  line-height: 1.95;
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin: 0 0 88px;
}

.value-grid article {
  padding: 24px;
  border-top: 1px solid var(--gold);
  background: rgba(255,255,255,.025);
}

.value-grid span { color: var(--gold); font-family: Georgia, serif; font-size: 12px; }
.value-grid h3 { margin: 8px 0 5px; font-size: 18px; }
.value-grid p { margin: 0; color: #8799aa; font-size: 13px; }

footer {
  padding: 42px 10px 48px;
  border-top: 1px solid var(--line);
  color: #718497;
  text-align: center;
  font-size: 12px;
}

footer p { margin: 5px 0; }
.footer-slogan { color: var(--gold-soft); letter-spacing: .16em; font-size: 16px; }
.filing a { color: #718497; text-decoration: none; }
.filing a:hover { color: var(--gold-soft); }

.toast {
  position: fixed;
  left: 50%;
  bottom: 34px;
  z-index: 20;
  transform: translate(-50%, 20px);
  padding: 11px 17px;
  border: 1px solid rgba(216,172,82,.45);
  border-radius: 9px;
  color: var(--cream);
  background: rgba(4, 18, 34, .96);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: .2s ease;
  font-size: 13px;
}

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

.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;
}

@media (max-width: 760px) {
  .page-shell { width: min(100% - 24px, 1180px); }
  .site-header { height: 76px; }
  .brand-mark { width: 40px; height: 40px; }
  .brand strong { font-size: 14px; }
  .brand small { font-size: 9px; }
  .status-pill { display: none; }
  .hero { padding: 58px 10px 40px; }
  .hero::before { width: 90vw; }
  .hero h1 { font-size: clamp(44px, 15vw, 66px); }
  .hero p { font-size: 14px; }
  .mode-tabs { grid-template-columns: 1fr; }
  .mode-tab { min-height: 66px; }
  .editor-card, .result-section { padding: 20px; border-radius: 13px; }
  .editor-heading, .result-heading { align-items: flex-start; }
  .editor-heading h2, .result-heading h2 { font-size: 20px; }
  textarea { min-height: 260px; padding: 17px; font-size: 15px; }
  .editor-actions { align-items: stretch; flex-direction: column; }
  .generate-button { width: 100%; }
  .result-heading { flex-direction: column; }
  .result-content { padding: 20px; font-size: 15px; line-height: 1.9; }
  .value-grid { grid-template-columns: 1fr; margin-bottom: 58px; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; }
}
.filing { font-size: 11px !important; opacity: 0.58 !important; line-height: 1.4 !important; }
.filing a { font-size: inherit !important; color: #718497 !important; }
footer .footer-slogan { margin-top: -18px !important; }
footer .footer-slogan + p { margin-bottom: 24px !important; }
