:root {
  color-scheme: dark;
  --bg: #0b1110;
  --panel: #111a18;
  --panel-2: #17231f;
  --ink: #eef4e9;
  --muted: #8fa096;
  --line: rgba(238, 244, 233, .12);
  --gold: #d9b66f;
  --green: #4bd18f;
  --red: #f06d63;
  --amber: #e6a84d;
  --blue: #7db4ff;
  --shadow: 0 24px 70px rgba(0, 0, 0, .34);
  --radius: 28px;
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100%;
  color: var(--ink);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(circle at 12% 0%, rgba(217, 182, 111, .18), transparent 28rem),
    radial-gradient(circle at 90% 12%, rgba(75, 209, 143, .10), transparent 24rem),
    linear-gradient(180deg, #0b1110 0%, #0d1413 48%, #090d0c 100%);
}
button, input { font: inherit; }
button { cursor: pointer; }
.shell {
  width: min(100%, 980px);
  margin: 0 auto;
  padding: max(22px, env(safe-area-inset-top)) 16px max(26px, env(safe-area-inset-bottom));
}
.hero { padding: 24px 2px 14px; }
.eyebrow {
  width: fit-content;
  padding: 6px 10px;
  border: 1px solid rgba(217, 182, 111, .38);
  color: var(--gold);
  font-size: 11px;
  line-height: 1;
  letter-spacing: .18em;
  border-radius: 99px;
  background: rgba(217, 182, 111, .08);
}
h1 {
  margin: 18px 0 10px;
  max-width: 9em;
  font-family: ui-serif, "Songti SC", "Noto Serif CJK SC", Georgia, serif;
  font-size: clamp(42px, 12vw, 86px);
  line-height: .92;
  letter-spacing: -.07em;
  text-wrap: balance;
}
.subcopy {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
  max-width: 39rem;
}
.search-card, .score-plate, .plan-card, .factor-card, .reason-card, .state-panel {
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.025));
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}
.search-card {
  margin-top: 20px;
  padding: 14px;
  border-radius: 24px;
}
.field-label {
  display: block;
  margin: 2px 4px 10px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: .08em;
}
.search-row { display: flex; gap: 10px; }
.search-row input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  height: 54px;
  padding: 0 16px;
  color: var(--ink);
  background: rgba(0, 0, 0, .28);
  border: 1px solid rgba(238,244,233,.10);
  border-radius: 18px;
  font-size: 17px;
}
.search-row input:focus { border-color: rgba(217,182,111,.58); box-shadow: 0 0 0 4px rgba(217,182,111,.10); }
.search-row button {
  width: 88px;
  border: 0;
  color: #11110e;
  background: var(--gold);
  border-radius: 18px;
  font-weight: 800;
}
.search-row button:disabled { opacity: .65; cursor: wait; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.chips button {
  border: 1px solid rgba(238,244,233,.12);
  background: rgba(238,244,233,.04);
  color: var(--muted);
  padding: 9px 11px;
  border-radius: 99px;
  font-size: 13px;
}
.state-panel { margin-top: 18px; border-radius: var(--radius); padding: 20px; }
.empty-state { display: flex; align-items: center; gap: 16px; }
.empty-mark {
  flex: 0 0 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  color: var(--gold);
  border: 1px solid rgba(217,182,111,.26);
  font-family: ui-serif, Georgia, serif;
  font-size: 32px;
}
.empty-state h2 { margin: 0 0 5px; font-size: 18px; }
.empty-state p { margin: 0; color: var(--muted); line-height: 1.6; font-size: 14px; }
.hidden { display: none !important; }
.result-panel { display: grid; gap: 14px; margin-top: 18px; }
.score-plate { padding: 18px; border-radius: var(--radius); }
.stock-line { display: flex; justify-content: space-between; gap: 12px; align-items: start; }
.stock-name { font-size: 26px; font-weight: 850; letter-spacing: -.04em; }
.stock-code { margin-top: 4px; color: var(--muted); font-size: 13px; letter-spacing: .08em; }
.quote-box { text-align: right; }
.quote-price { font-family: ui-serif, Georgia, serif; font-size: 30px; line-height: 1; }
.quote-change { margin-top: 4px; font-weight: 800; }
.quote-change.up { color: var(--red); }
.quote-change.down { color: var(--green); }
.score-core { display: grid; grid-template-columns: 132px 1fr; gap: 18px; align-items: center; margin-top: 24px; }
.score-ring {
  --score: 0;
  --ring: var(--gold);
  width: 132px;
  height: 132px;
  display: grid;
  place-items: center;
  position: relative;
  border-radius: 50%;
  background: conic-gradient(var(--ring) calc(var(--score) * 1%), rgba(255,255,255,.09) 0);
}
.score-ring::after {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: inherit;
  background: #101816;
  box-shadow: inset 0 0 0 1px rgba(238,244,233,.08);
}
.score-ring span, .score-ring small { position: relative; z-index: 1; }
.score-ring span { font-family: ui-serif, Georgia, serif; font-size: 46px; letter-spacing: -.06em; }
.score-ring small { align-self: end; margin: 0 0 28px -8px; color: var(--muted); font-size: 12px; }
.rating-badge {
  width: fit-content;
  color: var(--gold);
  border: 1px solid rgba(217,182,111,.30);
  padding: 6px 9px;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: .08em;
}
.score-copy h2 { margin: 12px 0 8px; font-size: 25px; letter-spacing: -.04em; }
.score-copy p { margin: 0; color: var(--muted); line-height: 1.65; font-size: 14px; }
.spark-card { margin-top: 18px; padding: 12px; border-radius: 22px; background: rgba(0,0,0,.22); border: 1px solid rgba(238,244,233,.08); }
#sparkline { display: block; width: 100%; height: 120px; }
.spark-meta { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 12px; }
.plan-card, .factor-card, .reason-card { padding: 16px; border-radius: 24px; }
.section-kicker { color: var(--gold); font-size: 11px; letter-spacing: .18em; margin-bottom: 14px; }
.plan-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.plan-grid > div { min-height: 74px; padding: 12px; border-radius: 18px; background: rgba(0,0,0,.20); border: 1px solid rgba(238,244,233,.08); }
.plan-grid span { display: block; color: var(--muted); font-size: 12px; margin-bottom: 9px; }
.plan-grid strong { display: block; font-size: 14px; line-height: 1.35; }
.review-trigger { margin: 13px 2px 0; color: var(--muted); font-size: 13px; line-height: 1.55; }
.factor-list { display: grid; gap: 12px; }
.factor-row { display: grid; grid-template-columns: 68px 1fr 42px; gap: 10px; align-items: center; }
.factor-name { color: var(--muted); font-size: 13px; }
.factor-track { height: 8px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.factor-fill { height: 100%; width: calc(var(--v) * 1%); background: var(--c); border-radius: inherit; }
.factor-num { text-align: right; font-variant-numeric: tabular-nums; font-size: 13px; }
.reason-card ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.reason-card li { color: #dbe6dd; font-size: 14px; line-height: 1.5; padding-left: 18px; position: relative; }
.reason-card li::before { content: ""; position: absolute; left: 0; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.deep-score { margin-top: 14px; padding: 12px; border-radius: 18px; background: rgba(217,182,111,.08); color: #ead8a8; font-size: 13px; line-height: 1.5; border: 1px solid rgba(217,182,111,.18); }
.footer-note { display: flex; justify-content: space-between; gap: 10px; margin: 18px 4px 0; color: rgba(143,160,150,.82); font-size: 11px; }
.error-card { color: #ffd6d3; border-color: rgba(240,109,99,.28); background: rgba(240,109,99,.08); }
@media (min-width: 860px) {
  .shell { padding-top: 48px; display: grid; grid-template-columns: .82fr 1.18fr; gap: 22px; align-items: start; }
  .hero { position: sticky; top: 24px; padding-top: 10px; }
  .state-panel, .result-panel { margin-top: 0; }
  .footer-note { grid-column: 1 / -1; }
}
@media (max-width: 380px) {
  .score-core { grid-template-columns: 112px 1fr; gap: 14px; }
  .score-ring { width: 112px; height: 112px; }
  .score-ring span { font-size: 38px; }
  .plan-grid { grid-template-columns: 1fr; }
  .search-row button { width: 78px; }
}
