:root {
  color-scheme: light;
  --navy: #082a52;
  --navy-deep: #061c36;
  --red: #a7202b;
  --gold: #d8b56a;
  --ink: #162438;
  --muted: #68768a;
  --line: #dfe5ed;
  --paper: #f4f7fb;
  --white: #ffffff;
  font-family: "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background: var(--paper);
}

button, input { font: inherit; }
button { cursor: pointer; }

.topbar {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(22px, 5vw, 84px);
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--navy);
  text-decoration: none;
}

.brand img { width: 42px; height: 42px; }
.brand strong { display: block; font-family: "Noto Serif SC", serif; font-size: 16px; letter-spacing: 0; }
.brand small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; letter-spacing: .08em; }
.topbar-note { color: var(--muted); font-size: 13px; }

main { max-width: 1240px; margin: 0 auto; padding: 0 clamp(22px, 5vw, 84px); }

.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr);
  gap: clamp(34px, 7vw, 110px);
  align-items: center;
  min-height: 430px;
  padding: 72px 0 68px;
}

.eyebrow { margin: 0 0 13px; color: var(--red); font-size: 12px; font-weight: 700; letter-spacing: .16em; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 22px; color: var(--navy-deep); font-family: "Noto Serif SC", serif; font-size: clamp(40px, 5vw, 66px); line-height: 1.15; letter-spacing: 0; }
h1 em { color: var(--red); font-style: normal; }
.intro-text { max-width: 480px; margin-bottom: 26px; color: var(--muted); font-size: 16px; line-height: 1.9; }
.data-note { display: inline-flex; align-items: center; gap: 8px; color: var(--navy); font-size: 13px; font-weight: 600; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #45a66b; box-shadow: 0 0 0 4px #dcefe3; }

.lookup-panel { min-width: 0; padding: 28px; background: var(--white); border: 1px solid #e2e5e9; border-radius: 8px; box-shadow: 0 10px 30px rgba(22, 36, 56, .06); }
.panel-kicker { margin-bottom: 18px; color: #25282d; font-size: 18px; font-weight: 600; }
.lookup-panel label { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.input-row { display: flex; align-items: end; gap: 10px; min-height: 78px; padding: 10px; background: var(--white); border: 1px solid #d7dce2; border-radius: 8px; transition: border-color .2s ease, box-shadow .2s ease; }
.input-row:focus-within { border-color: #858e99; box-shadow: 0 0 0 3px rgba(22, 36, 56, .07); }
.input-row input { min-width: 0; flex: 1; height: 50px; padding: 0 6px; color: #25282d; background: transparent; border: 0; outline: none; font-size: 15px; }
.input-row input::placeholder { color: #8d959f; }
.input-row button { display: inline-flex; flex: 0 0 42px; align-items: center; justify-content: center; width: 42px; height: 42px; border: 0; border-radius: 8px; background: #24272b; color: var(--white); transition: background .2s ease, transform .2s ease; }
.input-row button:hover { background: #3a3d42; transform: translateY(-1px); }
.input-row button:active { transform: translateY(0); }
.input-row button:disabled { opacity: .55; cursor: wait; transform: none; }
.input-row svg, .reset-button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.helper-text { margin: 13px 0 0; color: #737c87; font-size: 12px; line-height: 1.6; }
.form-message { margin-top: 14px; color: var(--red); font-size: 13px; }
.form-message:empty { display: none; }

.results-section { padding: 8px 0 84px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.section-heading .eyebrow { margin-bottom: 8px; }
h2 { margin-bottom: 0; color: var(--navy); font-family: "Noto Serif SC", serif; font-size: 25px; line-height: 1.35; }
.reset-button { display: inline-flex; align-items: center; gap: 7px; padding: 9px 13px; color: var(--navy); background: transparent; border: 1px solid #b8c4d2; font-size: 13px; }
.reset-button:hover { border-color: var(--navy); background: #eaf0f7; }
.results { padding-top: 24px; }
.empty-state { min-height: 160px; display: grid; place-items: center; align-content: center; gap: 10px; color: var(--muted); text-align: center; }
.empty-state p { margin-bottom: 0; font-size: 14px; }
.empty-mark { color: #b5c4d5; font-family: "Noto Serif SC", serif; font-size: 34px; font-weight: 700; letter-spacing: .05em; }
.result-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.result-card { position: relative; display: grid; grid-template-columns: 78px 1fr auto; gap: 18px; align-items: center; min-height: 126px; padding: 22px; background: var(--white); border: 1px solid var(--line); }
.result-card::before { position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--red); content: ""; }
.rank-block { display: grid; gap: 5px; color: var(--red); text-align: center; }
.rank-label { color: var(--muted); font-size: 11px; }
.rank-number { font-family: "Noto Serif SC", serif; font-size: 30px; font-weight: 700; line-height: 1; }
.person-name { margin-bottom: 8px; color: var(--navy); font-size: 18px; font-weight: 700; overflow-wrap: anywhere; }
.score { color: var(--navy); text-align: right; white-space: nowrap; }
.score strong { display: block; font-family: "Noto Serif SC", serif; font-size: 34px; line-height: 1; }
.score span { display: block; margin-top: 7px; color: var(--muted); font-size: 12px; }
.result-summary { margin: 0 0 16px; color: var(--muted); font-size: 13px; }
.no-result { padding: 34px 18px; background: var(--white); border: 1px solid var(--line); text-align: center; }
.no-result strong { display: block; margin-bottom: 8px; color: var(--navy); font-size: 17px; }
.no-result span { color: var(--muted); font-size: 13px; }
.error-state { color: var(--red); }

.footer { display: flex; justify-content: space-between; gap: 16px; padding: 22px clamp(22px, 5vw, 84px); color: #78879a; background: var(--white); border-top: 1px solid var(--line); font-size: 12px; }

@media (max-width: 720px) {
  .topbar { height: 68px; }
  .topbar-note { display: none; }
  .intro { display: block; min-height: auto; padding: 50px 0 42px; }
  h1 { font-size: 43px; }
  .intro-text { font-size: 14px; }
  .lookup-panel { margin-top: 34px; padding: 22px; }
  .section-heading { align-items: start; flex-direction: column; }
  .result-card { grid-template-columns: 61px minmax(0, 1fr); gap: 12px; padding: 19px 17px; }
  .score { grid-column: 2; display: flex; align-items: baseline; gap: 6px; justify-content: flex-start; margin-top: -7px; text-align: left; }
  .score strong { font-size: 28px; }
  .score span { margin-top: 0; }
  .footer { flex-direction: column; gap: 7px; }
}

