:root {
  color-scheme: dark;
  --ink: #edf3fb;
  --muted: #9aaabd;
  --dim: #6f8197;
  --navy: #07111f;
  --panel: rgba(12, 28, 47, .84);
  --line: rgba(161, 187, 214, .18);
  --silver: #b9d0e7;
  --blue: #72b5ff;
  --blue-deep: #205d9d;
  --gold: #e9c77a;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  background: var(--navy);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.6;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 75% 8%, rgba(40, 108, 171, .25), transparent 32%), linear-gradient(135deg, rgba(255,255,255,.025), transparent 42%);
}
a { color: inherit; }
.shell { position: relative; width: min(1160px, calc(100% - 40px)); margin: 0 auto; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 28px 0 24px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; letter-spacing: .03em; }
.brand-logo { display: block; width: 48px; height: 48px; border: 1px solid rgba(185,208,231,.42); border-radius: 12px; object-fit: cover; }
.brand strong, .brand small { display: block; line-height: 1.1; }
.brand strong { font-family: Georgia, serif; font-size: 18px; letter-spacing: .12em; }
.brand small { margin-top: 4px; color: var(--dim); font-size: 10px; letter-spacing: .22em; }
.secure-label { color: var(--muted); font-size: 13px; letter-spacing: .08em; }
.secure-label i { display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: #6bd59b; box-shadow: 0 0 12px rgba(107,213,155,.65); }
main { display: grid; grid-template-columns: minmax(0, 1.38fr) minmax(300px, .62fr); gap: 34px; padding: 74px 0 88px; }
.query-panel, .side-panel { border: 1px solid var(--line); background: var(--panel); box-shadow: 0 24px 80px rgba(0, 0, 0, .24); backdrop-filter: blur(12px); }
.query-panel { min-height: 520px; padding: clamp(30px, 6vw, 72px); }
.eyebrow, .result-head span, .side-kicker { color: var(--blue); font-size: 11px; font-weight: 700; letter-spacing: .2em; }
h1 { max-width: 650px; margin: 18px 0 15px; font-family: Georgia, "Songti SC", serif; font-size: clamp(38px, 6vw, 70px); font-weight: 500; line-height: 1.05; letter-spacing: -.04em; }
.intro { max-width: 580px; margin: 0 0 45px; color: var(--muted); font-size: 17px; }
.query-form label { display: block; margin-bottom: 10px; color: var(--silver); font-size: 14px; font-weight: 600; }
.input-row { display: flex; gap: 10px; }
input { width: 100%; min-height: 56px; border: 1px solid rgba(185,208,231,.32); border-radius: 2px; outline: 0; padding: 0 17px; background: rgba(3, 12, 23, .75); color: var(--ink); font: inherit; transition: border-color .2s, box-shadow .2s; }
input::placeholder { color: #607388; }
input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(114,181,255,.15); }
button { display: inline-flex; align-items: center; justify-content: center; gap: 18px; min-width: 145px; border: 1px solid #8ec5f5; border-radius: 2px; background: linear-gradient(135deg, #2b78bd, #174a83); color: white; cursor: pointer; font: inherit; font-weight: 700; transition: transform .2s, filter .2s; }
button:hover { filter: brightness(1.12); transform: translateY(-1px); }
button:disabled { cursor: wait; opacity: .62; transform: none; }
button b { font-size: 20px; font-weight: 400; }
.form-hint { margin: 12px 0 0; color: var(--dim); font-size: 13px; }
.status { min-height: 27px; margin-top: 22px; color: var(--muted); font-size: 14px; }
.status.error { color: #eaa4a4; }
.status.ok { color: #97d9b0; }
.result-card { margin-top: 24px; border-top: 1px solid rgba(114,181,255,.45); border-bottom: 1px solid var(--line); padding: 20px 0 3px; }
.result-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.result-head em { padding: 3px 8px; border: 1px solid rgba(107,213,155,.35); color: #9ee1b6; font-size: 12px; font-style: normal; }
.result-grid { display: grid; grid-template-columns: 1.4fr 1.2fr .8fr; gap: 20px; }
.result-grid div { min-width: 0; padding-bottom: 17px; }
.result-grid span, .result-grid strong { display: block; }
.result-grid span { margin-bottom: 6px; color: var(--dim); font-size: 13px; }
.result-grid strong { overflow-wrap: anywhere; color: var(--ink); font-size: 16px; font-weight: 600; }
.result-grid div:last-child strong { color: var(--gold); font-family: Georgia, serif; font-size: 22px; }
.dialog-backdrop { position: fixed; z-index: 20; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(1, 8, 16, .76); backdrop-filter: blur(8px); }
.dialog-backdrop[hidden] { display: none; }
.dialog-card { position: relative; width: min(560px, 100%); border: 1px solid rgba(114,181,255,.46); background: linear-gradient(145deg, #102b47, #071421); box-shadow: 0 28px 90px rgba(0,0,0,.55); padding: 36px clamp(24px, 6vw, 48px) 30px; animation: dialog-in .18s ease-out; }
.dialog-x { position: absolute; top: 12px; right: 14px; min-width: 0; width: 34px; height: 34px; border: 0; background: transparent; color: var(--muted); font-size: 28px; font-weight: 300; }
.dialog-x:hover { color: white; filter: none; transform: none; }
.dialog-kicker { color: var(--gold); font-size: 11px; font-weight: 700; letter-spacing: .2em; }
.dialog-card h2 { margin: 12px 0 8px; font-size: 30px; }
.dialog-message { margin: 0 0 22px; color: var(--muted); }
.dialog-card .result-grid { margin: 0 0 23px; }
.dialog-done { width: 100%; min-height: 48px; }
body.dialog-open { overflow: hidden; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.side-panel { align-self: stretch; min-height: 520px; padding: 38px 34px; background: linear-gradient(160deg, rgba(16, 48, 78, .9), rgba(8, 19, 34, .9)); }
.seal { width: 136px; height: 136px; margin-bottom: 38px; }
.seal img { display: block; width: 136px; height: 136px; border: 1px solid rgba(233,199,122,.3); border-radius: 25px; object-fit: cover; }
.side-kicker { margin-bottom: 12px; color: var(--gold); }
h2 { margin: 0 0 20px; font-family: Georgia, "Songti SC", serif; font-size: 36px; font-weight: 500; line-height: 1.12; }
.side-panel p { color: var(--muted); font-size: 15px; }
.tg-link { display: inline-flex; align-items: center; gap: 10px; margin-top: 20px; color: var(--silver); font-size: 15px; font-weight: 700; text-decoration: none; }
.tg-link span { color: var(--gold); font-size: 20px; }
.tg-link:hover { color: white; }
.side-rule { width: 45px; height: 1px; margin: 42px 0 20px; background: var(--gold); }
.side-note { margin: 0; color: var(--dim) !important; font-size: 13px !important; }
footer { display: flex; justify-content: space-between; padding: 18px 0 30px; border-top: 1px solid var(--line); color: var(--dim); font-size: 12px; letter-spacing: .06em; }
@media (max-width: 780px) {
  .shell { width: min(100% - 28px, 600px); }
  .topbar { padding-top: 19px; }
  main { grid-template-columns: 1fr; gap: 18px; padding: 38px 0 55px; }
  .query-panel { min-height: 0; padding: 34px 24px 30px; }
  .side-panel { min-height: 0; padding: 28px 24px 31px; }
  .seal { margin-bottom: 31px; }
  .input-row { flex-direction: column; }
  button { min-height: 54px; }
  .result-grid { grid-template-columns: 1fr; gap: 0; }
  .result-grid div { display: flex; justify-content: space-between; gap: 15px; border-bottom: 1px solid rgba(161,187,214,.1); padding: 12px 0; }
  .result-grid span, .result-grid strong { margin: 0; }
  footer { gap: 15px; flex-direction: column; }
  .dialog-card .result-grid { gap: 0; }
}
