.history-page .tool-panel {
  border-radius: 8px !important;
  box-shadow: none;
  padding: 24px;
}

.history-section-head,
.history-actions,
.history-card-head,
.history-card-actions,
.history-empty-actions {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.history-section-head {
  margin-bottom: 18px;
}

.history-eyebrow {
  color: var(--brand-dark);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  margin: 0;
  text-transform: uppercase;
}

.history-section-head h2,
.history-next h2 {
  color: var(--ink);
  font-size: 1.4rem;
  letter-spacing: 0;
  margin: 3px 0 0;
}

.history-count {
  background: var(--chip);
  border-radius: 999px;
  color: var(--brand-dark);
  flex: 0 0 auto;
  font-size: 0.72rem;
  font-weight: 900;
  padding: 6px 9px;
}

.history-page .intro-text {
  background: var(--canvas);
  border: 0;
  border-radius: 8px !important;
  box-shadow: none;
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 18px;
  padding: 14px 16px;
}

.history-actions {
  justify-content: flex-start;
  margin-bottom: 22px;
}

.history-output {
  min-height: 180px;
}

.history-list-modern {
  display: grid;
  gap: 12px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.history-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 14px;
  padding: 16px;
}

.history-card-head {
  align-items: flex-start;
}

.history-card-title {
  color: var(--ink);
  display: block;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1.3;
}

.history-card-date {
  color: var(--muted);
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  margin-top: 4px;
}

.history-card-summary {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
  margin: 0;
}

.history-card-actions {
  flex: 0 0 auto;
  justify-content: flex-end;
}

.history-card-actions .tool-btn {
  box-shadow: none;
  min-height: 38px;
  padding: 8px 13px;
  text-decoration: none;
}

.history-swatches {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.history-swatches span {
  background: var(--history-color);
  border: 1px solid rgb(32 37 53 / 0.12);
  border-radius: 6px;
  flex: 0 0 42px;
  height: 34px;
}

.history-empty {
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 24px;
}

.history-empty h3 {
  color: var(--ink);
  font-size: 1.15rem;
  margin: 0 0 8px;
}

.history-empty p {
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 18px;
}

.history-empty-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

.history-page .adsense-top {
  margin: 0 0 24px;
}

.history-next {
  margin-bottom: 12px;
}

.history-next .modern-tool-actions {
  margin-top: 14px;
}

@media (max-width: 720px) {
  .history-section-head,
  .history-card-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .history-card-actions {
    justify-content: flex-start;
    width: 100%;
  }
}

@media (max-width: 520px) {
  .history-page .tool-panel {
    padding: 18px 16px;
  }

  .history-actions,
  .history-card-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .history-actions .tool-btn,
  .history-card-actions .tool-btn {
    text-align: center;
    width: 100%;
  }
}
