:root {
  --ink: #172d2a;
  --muted: #61736a;
  --green: #135d4c;
  --green-dark: #0d493b;
  --bg: #f3f5f4;
  --edge: #d3dfd8;
  --white: #fff;
  --purple: #62418e;
  --blue: #315f8f;
  --gold: #8a5915;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.45 "Microsoft YaHei", system-ui, sans-serif;
}
button, a { font: inherit; }
a { color: inherit; }
.wrap { width: min(1180px, 100%); margin: 0 auto; padding: 0 20px; }
.site-header { background: #133e36; color: #fff; padding: 16px 0 18px; }
.brand-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.brand { color: #b8dac9; font-size: 10px; letter-spacing: .12em; }
.updated { color: #fff; font-size: 18px; font-weight: 800; letter-spacing: .04em; white-space: nowrap; text-shadow: 0 1px 2px rgba(0,0,0,.18); }
h1 { margin: 7px 0 0; font-size: 28px; line-height: 1.2; }
.header-note { margin: 8px 0 0; color: #d4e7de; font-size: 12px; }
.main { padding-top: 12px; padding-bottom: 46px; }
.toolbar {
  position: sticky; top: 0; z-index: 5;
  margin-bottom: 15px; padding: 9px;
  background: rgba(255,255,255,.96); border: 1px solid var(--edge);
  border-radius: 9px; box-shadow: 0 4px 14px rgba(23,45,42,.06);
  backdrop-filter: blur(6px);
}
.toolbar-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.filters { display: flex; flex-wrap: wrap; gap: 5px; min-width: 0; }
.chip, .info-button {
  min-height: 32px; padding: 6px 10px; border: 1px solid #cbd9d0;
  border-radius: 5px; background: var(--white); color: #355d4e;
  cursor: pointer; font-size: 12px;
}
.chip:hover, .info-button:hover, .page-button:hover { border-color: var(--green); }
.chip[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: #fff; }
.info-button { flex: none; color: #4a6d60; }
.summary { margin-top: 8px; color: var(--muted); font-size: 12px; }
.loading, .error { padding: 28px 12px; border: 1px dashed var(--edge); border-radius: 8px; text-align: center; color: var(--muted); }
.error { color: #8d3e2d; background: #fff7f3; border-color: #e6b9aa; }
.group { margin-top: 15px; padding: 12px; border: 1px solid var(--section-edge); border-top: 4px solid var(--section-ink); border-radius: 8px; background: var(--section-bg); }
.group-today { --section-bg: #eae4f5; --section-ink: var(--purple); --section-edge: #d2c3e9; }
.group-purchase { --section-bg: #e0eee5; --section-ink: #226444; --section-edge: #bdd7c7; }
.group-intent { --section-bg: #fff0d1; --section-ink: var(--gold); --section-edge: #e8cf9d; }
.group-result { --section-bg: #e1edf9; --section-ink: var(--blue); --section-edge: #bdcfe4; }
.group-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; color: var(--section-ink); }
.group-head h2 { margin: 0; font-size: 19px; }
.count { font-size: 12px; font-weight: 700; white-space: nowrap; }
.list { display: grid; grid-template-columns: minmax(0, 1fr); gap: 9px; align-items: start; }
.card { min-width: 0; width: 100%; height: 204px; display: flex; flex-direction: column; overflow: hidden; padding: 10px 14px 8px; border: 1px solid #cddbd3; border-radius: 6px; background: rgba(255,255,255,.96); }
.card-content { flex: 1; min-height: 0; overflow: auto; scrollbar-width: thin; }
.card-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(150px, 200px); align-items: start; gap: 18px; }
.heading-text { min-width: 0; }
.bar { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.badge { padding: 2px 6px; border-radius: 3px; background: #e3f2e9; color: #1d684b; font-size: 11px; font-weight: 700; }
.badge.result { background: #e6effa; color: var(--blue); }
.badge.intent { background: #fff0ce; color: var(--gold); }
.place { display: inline-flex; align-items: center; min-height: 24px; padding: 3px 9px; border-radius: 4px; color: #fff; background: #465c6a; font-size: 12px; font-weight: 800; letter-spacing: .03em; }
.place[data-region="陕西"] { background: #dc2626; }
.place[data-region="甘肃"] { background: #facc15; color: #493800; }
.place[data-region="青海"] { background: #2563eb; }
.place[data-region="宁夏"] { background: #15803d; }
.place[data-region="新疆及兵团"] { background: #9333ea; }
.place[data-region="重庆"] { background: #f97316; color: #421d00; }
.place[data-region="军队"] { background: #79502f; }
.card h3 { margin: 6px 0 7px; font-size: 16px; line-height: 1.45; overflow-wrap: anywhere; }
.amounts { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.amount { max-width: 100%; display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.amount span { color: #5f7368; font-size: 11px; }
.amount strong { color: #0f684d; font-size: 19px; font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; }
.amount.award strong { color: #965416; }
.data { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; }
.field { display: flex; min-width: 0; align-items: baseline; gap: 6px; }
.field.wide { grid-column: 1 / -1; }
.field span { flex: none; color: #617268; font-size: 11px; }
.field strong { min-width: 0; max-height: 34px; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; font-size: 12px; font-weight: 500; overflow-wrap: anywhere; }
.money span { color: #236b4e; font-weight: 700; }
.money strong { color: #0f593f; font-size: 15px; line-height: 1.25; font-weight: 800; }
.money.award-money span { color: #8a5915; }
.money.award-money strong { color: #7a4a0d; }
.money.missing span, .money.missing strong { color: #875b1a; }
.expired { margin-top: 5px; color: #99501e; font-size: 11px; }
.card-footer { display: flex; flex: none; align-items: flex-end; justify-content: space-between; gap: 6px; margin-top: 4px; padding-top: 5px; border-top: 1px solid #e3eae5; }
.actions { display: flex; flex-wrap: wrap; gap: 5px; min-width: 0; }
.published { flex: none; color: #718178; font-size: 11px; white-space: nowrap; padding-bottom: 6px; }
.link, .history { display: inline-flex; align-items: center; justify-content: center; min-height: 30px; padding: 4px 8px; border-radius: 4px; font-size: 11px; text-decoration: none; cursor: pointer; }
.link { border: 1px solid #185a46; background: #185a46; color: #fff; }
.link.restricted { border-color: #a36a1b; background: #a36a1b; }
.history { border: 1px solid #b8cebf; background: #fff; color: #235f49; }
.empty { grid-column: 1 / -1; padding: 9px; border-radius: 4px; color: #617064; background: rgba(255,255,255,.5); text-align: center; font-size: 12px; }
.pagination { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 5px; margin-top: 10px; }
.page-button { min-width: 30px; min-height: 30px; padding: 4px 8px; border: 1px solid #b8cebf; border-radius: 4px; background: #fff; color: #235f49; cursor: pointer; font-size: 11px; }
.page-button[aria-current="page"] { border-color: var(--green); background: var(--green); color: #fff; }
.page-button:disabled { cursor: default; opacity: .45; }
.page-label { color: var(--muted); font-size: 11px; }
.modal { width: min(680px, calc(100% - 22px)); max-height: min(86vh, 820px); padding: 0; border: 0; border-radius: 10px; color: var(--ink); box-shadow: 0 18px 70px rgba(0,0,0,.28); }
.modal::backdrop { background: rgba(21,41,35,.66); }
.modal-head { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--edge); background: #fff; }
.modal-head h2 { margin: 0; font-size: 17px; }
.close { width: 32px; height: 32px; border: 0; border-radius: 50%; background: #e8f0eb; color: var(--ink); font-size: 22px; cursor: pointer; }
.modal-body { padding: 14px 16px; overflow-wrap: anywhere; }
.modal-body h3 { margin-top: 0; font-size: 16px; }
.timeline { border-left: 2px solid #c8dfd0; padding-left: 16px; }
.event { position: relative; padding-bottom: 14px; }
.event::before { content: ""; position: absolute; left: -21px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: #419671; }
.event small { display: block; color: var(--muted); }
.event a { color: var(--green); font-weight: 700; }
.warning { padding: 9px 10px; border-left: 3px solid #bd8821; background: #fff8e8; color: #6f521b; }
@media (max-width: 800px) {
  .wrap { padding-left: 8px; padding-right: 8px; }
  .site-header { padding: 10px 0 12px; }
  h1 { font-size: 21px; }
  .updated { font-size: 15px; }
  .header-note { margin-top: 5px; font-size: 10px; }
  .toolbar { padding: 6px; }
  .toolbar-top { display: block; }
  .info-button { margin-top: 6px; }
  .group { margin-top: 10px; padding: 7px; border-top-width: 3px; }
  .group-head h2 { font-size: 16px; }
  .list { gap: 6px; }
  .card { height: 218px; padding: 8px; }
  .card-heading { grid-template-columns: minmax(0, 1fr) minmax(105px, 34%); gap: 9px; }
  .card h3 { font-size: 14px; margin: 5px 0 6px; }
  .amount strong { font-size: 16px; }
  .amount span { font-size: 10px; }
  .place { font-size: 11px; min-height: 22px; padding: 2px 7px; }
  .field span { font-size: 10px; }
  .field strong { font-size: 11px; line-height: 1.3; }
  .money strong { font-size: 13px; line-height: 1.25; }
  .chip, .info-button { font-size: 11px; padding: 4px 7px; }
}
@media (min-width: 600px) and (max-width: 1024px) {
  .card { height: 176px; padding: 8px 10px; }
  .card-content { position: relative; padding-right: 170px; }
  .card-heading { display: block; }
  .amounts { position: absolute; top: 0; right: 0; width: 158px; }
  .card h3 { margin: 4px 0 6px; }
  .data { gap: 3px 10px; }
  .expired { margin-top: 4px; }
}
@media (max-width: 360px) { .data { grid-template-columns: 1fr; } .field.wide { grid-column: auto; } .published { font-size: 10px; } }
