* { box-sizing: border-box; }
body { margin: 0; background: #f5f7fa; color: #172033; font-family: Arial, "Microsoft YaHei", sans-serif; font-size: 14px; }
.popup { width: 300px; background: #fff; }
.popup main { padding: 14px; }
h1, h2, p { margin: 0; }
h1 { font-size: 20px; letter-spacing: 0; }
h2 { font-size: 15px; }
p { color: #64748b; line-height: 1.5; }
button, .file-btn { border: 1px solid #cbd5e1; border-radius: 7px; background: #fff; color: #172033; padding: 9px 12px; font: inherit; cursor: pointer; }
.file-btn input { display: none; }
.popup button { width: 100%; margin-top: 8px; }
button.primary { background: #0f766e; border-color: #0f766e; color: #fff; font-weight: 700; }
button.muted { color: #64748b; }
.status { min-height: 20px; margin-top: 10px; }
.status.good { color: #047857; }
.status.bad { color: #b91c1c; }
.topbar { display: flex; justify-content: space-between; gap: 16px; align-items: center; padding: 14px 24px; background: #fff; border-bottom: 1px solid #e5e7eb; }
.topbar p { margin-top: 4px; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 72vw; }
.actions { display: flex; gap: 8px; align-items: center; }
.hidden-controls { display: none; }
.filters { display: grid; grid-template-columns: 1fr 180px minmax(260px, 420px); gap: 10px; margin: 14px 24px 0; align-items: end; }
.filters label { display: grid; gap: 6px; color: #516071; }
.filter-card { min-height: 54px; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 10px; background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; }
.filter-card span { padding: 5px 8px; border-radius: 999px; background: #eef2f7; color: #334155; font-weight: 700; white-space: nowrap; }
input, select { height: 36px; border: 1px solid #cbd5e1; border-radius: 6px; padding: 4px 8px; font: inherit; background: #fff; min-width: 0; }
.workspace { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 14px; padding: 14px 24px 28px; }
.priority-panel { position: sticky; top: 12px; align-self: start; background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; padding: 12px; }
.priority-list { display: grid; gap: 7px; margin-top: 10px; }
.priority-item { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 6px; min-height: 38px; padding: 7px; border: 1px solid #dbe3ee; border-radius: 7px; background: #f8fafc; cursor: grab; touch-action: none; user-select: none; }
.priority-item b { color: #0f766e; font-size: 15px; }
.priority-item span { font-weight: 700; color: #334155; }
.priority-item.dragging { opacity: .45; }
.priority-controls { display: flex; gap: 4px; }
.priority-controls button { width: 28px; height: 26px; padding: 0; border-radius: 6px; background: #fff; color: #475569; font-size: 12px; font-weight: 700; }
.result-bar { display: flex; align-items: baseline; gap: 10px; min-height: 36px; color: #64748b; }
.result-bar strong { font-size: 22px; color: #0f766e; }
.table-wrap { overflow: auto; background: #fff; border: 1px solid #e5e7eb; border-radius: 8px; }
table { width: 100%; min-width: 1160px; border-collapse: collapse; }
th, td { padding: 8px 9px; border-bottom: 1px solid #eef2f7; text-align: left; vertical-align: top; }
th { position: sticky; top: 0; z-index: 1; background: #334155; color: #fff; font-weight: 700; white-space: nowrap; }
td { background: #fff; line-height: 1.35; }
td.num { width: 44px; text-align: center; font-weight: 800; color: #0f172a; }
td.source { width: 82px; color: #64748b; }
td.home { min-width: 260px; }
td.home a { color: #0f766e; font-weight: 700; text-decoration: none; }
td.home small { display: block; margin-top: 3px; color: #64748b; }
td.tags { min-width: 210px; }
td.tags span { display: inline-block; margin: 0 5px 5px 0; padding: 3px 7px; border-radius: 999px; background: #e8f6ef; color: #166534; font-size: 12px; font-weight: 700; }
td.dup-links { min-width: 76px; }
td.dup-links a { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; margin-right: 5px; border-radius: 999px; background: #eef2f7; color: #0f766e; text-decoration: none; font-weight: 800; }
.empty { padding: 14px; background: #fff; border: 1px dashed #cbd5e1; border-radius: 8px; }
@media (max-width: 980px) {
  .filters, .workspace { grid-template-columns: 1fr; }
  .priority-panel { position: static; }
  .topbar { align-items: start; flex-direction: column; }
}

@media (max-width: 700px) {
  body { background: #eef2f7; font-size: 13px; }
  .topbar { padding: 8px 10px; gap: 6px; align-items: stretch; }
  h1 { font-size: 18px; }
  .topbar p { max-width: 100%; font-size: 11px; }
  .actions { width: 100%; display: flex; gap: 5px; }
  button, .file-btn { flex: 0 0 auto; padding: 5px 7px; border-radius: 6px; text-align: center; font-size: 11px; }
  .filters { display: none; }
  input, select { height: 34px; }
  .workspace { padding: 10px; gap: 10px; }
  .priority-panel { padding: 10px; }
  .priority-list { grid-template-columns: 1fr; gap: 6px; }
  .priority-item { grid-template-columns: 24px 1fr auto; min-height: 36px; padding: 6px; gap: 5px; cursor: default; }
  .priority-item b { font-size: 13px; }
  .priority-item span { font-size: 13px; }
  .priority-controls button { width: 28px; height: 26px; font-size: 12px; }
  .result-bar { position: sticky; top: 0; z-index: 3; padding: 7px 0; background: #eef2f7; }
  .result-bar strong { font-size: 17px; }
  .result-bar span { font-size: 12px; }
  .table-wrap { overflow: visible; border: 0; background: transparent; }
  table { min-width: 0; width: 100%; border-collapse: separate; border-spacing: 0 8px; }
  thead { display: none; }
  tbody, tr, td { display: block; width: 100%; }
  tr { position: relative; display: flex; flex-wrap: wrap; gap: 7px; padding: 10px; background: #fff; border: 1px solid #dbe3ee; border-radius: 8px; }
  td { width: auto; padding: 0; border: 0; background: transparent; line-height: 1.35; }
  td::before { color: #64748b; font-weight: 700; content: ""; }
  td.num { display: none; }
  td.source { position: absolute; top: 10px; right: 10px; display: block; width: auto; max-width: 90px; padding: 3px 7px; border-radius: 999px; background: #eef2f7; color: #475569; font-size: 11px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  td.source::before { content: ""; }
  td.home { min-width: 0; display: block; flex: 1 0 100%; padding: 0 72px 8px 0; border-bottom: 1px solid #eef2f7; }
  td.home::before { display: none; }
  td.home a { font-size: 15px; }
  td:nth-child(n+4):nth-child(-n+9) { display: inline-flex; flex: 0 0 calc((100% - 7px) / 2); flex-direction: column; justify-content: center; min-width: 0; overflow-wrap: anywhere; padding: 7px 8px; color: #172033; font-weight: 700; }
  td:nth-child(4)::before { content: "租金"; font-size: 11px; margin-bottom: 2px; }
  td:nth-child(5)::before { content: "面积"; font-size: 11px; margin-bottom: 2px; }
  td:nth-child(6)::before { content: "户型"; font-size: 11px; margin-bottom: 2px; }
  td:nth-child(7)::before { content: "车位"; font-size: 11px; margin-bottom: 2px; }
  td:nth-child(8)::before { content: "楼层"; font-size: 11px; margin-bottom: 2px; }
  td:nth-child(9)::before { content: "朝向"; font-size: 11px; margin-bottom: 2px; }
  td.tags { min-width: 0; flex: 1 0 100%; display: block; padding-top: 7px; border-top: 1px solid #eef2f7; }
  td.tags::before { display: block; margin-bottom: 5px; content: "关键词"; }
  td.tags span { margin-bottom: 4px; }
  td.dup-links, td.collected { display: none; }
}

body { background: linear-gradient(125deg, #e2efed 0%, #edf0f6 48%, #f2e8ee 100%); background-attachment: fixed; }
.topbar, .priority-panel, .table-wrap { background: rgba(255,255,255,.64); border-color: rgba(255,255,255,.85); -webkit-backdrop-filter: blur(20px) saturate(125%); backdrop-filter: blur(20px) saturate(125%); }
.workspace { grid-template-columns: 300px minmax(0, 1fr); }
.priority-panel { border-radius: 0; border: 0; }
.priority-item, button, .file-btn { background: rgba(255,255,255,.55); border-color: rgba(255,255,255,.9); }
td { background: transparent; }
th { background: rgba(39,64,63,.92); }
@media (max-width: 980px) {
  .workspace { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .table-wrap { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
  tr { background: rgba(255,255,255,.66); border-color: rgba(255,255,255,.9); box-shadow: 0 3px 14px rgba(35,65,60,.05); -webkit-backdrop-filter: blur(16px) saturate(125%); backdrop-filter: blur(16px) saturate(125%); }
  .result-bar { background: rgba(235,242,242,.86); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
  td:nth-child(n+4):nth-child(-n+9) { background: transparent; }
}
