.home-page {
  padding-top: 24px;
}

.home-workbench {
  display: grid;
  grid-template-columns: minmax(420px, 500px) minmax(0, 1fr);
  gap: 22px;
  align-items: stretch;
}

.home-left-col,
.home-right-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.home-form-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px 26px;
}

.home-card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-soft);
}

.home-card-title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: 0.02em;
}

.home-card-badge {
  font-size: 12px;
  font-weight: 700;
  color: var(--red);
  background-color: var(--red-soft);
  border: 1px solid var(--red-border);
  border-radius: 999px;
  padding: 3px 10px;
}

.form-block {
  display: flex;
  flex-direction: column;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.home-chip {
  padding: 10px 8px;
  font-size: 14px;
}

.score-box {
  text-align: center;
  background-color: var(--bg-page);
  border: 1.5px solid var(--border-strong);
  border-radius: 14px;
  padding: 18px 16px 16px;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.score-box:focus-within {
  border-color: var(--red-border);
  background-color: #fffdfb;
}

.score-input-row {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
}

.score-input {
  width: 140px;
  height: 54px;
  line-height: 54px;
  font-size: 44px;
  font-weight: 800;
  color: var(--red);
  text-align: center;
  background: transparent;
  border: none;
  outline: none;
}

.score-input::placeholder {
  color: #d6d0c4;
  font-weight: 700;
}

.score-unit {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-muted);
}

.score-rank {
  margin-top: 8px;
  font-size: 13px;
  color: var(--ink-sub);
}

.score-rank-strong {
  color: var(--navy);
  font-weight: 800;
  font-size: 14px;
}

.score-guide {
  margin-top: 8px;
  font-size: 12px;
  color: var(--ink-light);
}

.score-error {
  margin-top: 8px;
  font-size: 13px;
  color: var(--red);
  font-weight: 600;
}

.score-metrics {
  margin-top: 8px;
  font-size: 12px;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.score-metrics strong {
  color: var(--ink);
}

.score-metric-dot {
  color: #d6d0c4;
}

.score-boundary {
  margin-top: 10px;
  font-size: 12px;
  color: var(--orange);
  background-color: var(--orange-soft);
  border-radius: 8px;
  padding: 4px 10px;
  display: inline-block;
}

.prov-hint {
  background-color: var(--surface-warm);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 12px;
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.prov-hint-dot {
  color: var(--red);
  font-weight: 900;
}

.home-submit-btn {
  height: 48px;
  font-size: 15px;
}

/* 右列：本地查询记录面板 */
.home-history-card {
  height: 100%;
  padding: 24px 26px;
  display: flex;
  flex-direction: column;
}

.home-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-soft);
  flex-shrink: 0;
}

.home-history-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.home-history-title {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  color: var(--ink);
}

.home-history-count {
  font-size: 12px;
  color: var(--ink-muted);
  background-color: var(--surface-warm);
  padding: 2px 9px;
  border-radius: 999px;
  font-weight: 600;
}

.home-history-clear {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-muted);
  padding: 4px 10px;
  border-radius: 8px;
  transition: all 0.14s ease;
}

.home-history-clear:hover {
  background-color: var(--red-soft);
  color: var(--red);
}

.home-history-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 540px;
  overflow-y: auto;
  padding-right: 2px;
}

.home-history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 16px;
  border-radius: 12px;
  background-color: var(--bg-page);
  border: 1px solid var(--border-soft);
  cursor: pointer;
  transition: border-color 0.14s ease, background-color 0.14s ease;
}

.home-history-item:hover {
  border-color: var(--red-border);
  background-color: #fffdfb;
}

.hh-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hh-top {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.hh-elec {
  font-size: 12px;
  color: var(--ink-muted);
}

.hh-bottom {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
}

.hh-score {
  font-size: 16px;
  font-weight: 800;
  color: var(--red);
}

.hh-rank {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
}

.hh-time {
  font-size: 12px;
  color: var(--ink-light);
}

.hh-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.hh-open {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
}

.hh-del {
  font-size: 12px;
  color: var(--ink-light);
  padding: 4px 8px;
  border-radius: 6px;
}

.hh-del:hover {
  background-color: var(--red-soft);
  color: var(--red);
}

.home-history-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 20px;
}

.hh-empty-icon {
  font-size: 32px;
  opacity: 0.45;
  margin-bottom: 10px;
}

.hh-empty-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-sub);
}

.hh-empty-sub {
  margin-top: 6px;
  font-size: 13px;
  color: var(--ink-light);
  max-width: 300px;
  line-height: 1.6;
}

.home-footnote {
  margin-top: 16px;
}

@media (max-width: 959px) {
  .home-page {
    padding-top: 14px;
  }

  .home-workbench {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .home-form-card,
  .home-history-card {
    padding: 18px 16px;
    gap: 16px;
  }

  .home-card-title-row {
    display: none;
  }

  .home-history-empty {
    padding: 24px 12px;
  }

  .score-input {
    font-size: 38px;
    height: 48px;
  }
}
