/* 随机数工具 — 使用 tools-wrap 统一宽度 */
.number-tool-page {
  background: #f5f6f8;
}

.number-tool-wrap {
  /* 兼容旧类名，实际布局用 tools-wrap */
}

.number-panel {
  /* 与 site-card 叠加：保留内边距微调 */
  margin-bottom: 0;
}

.number-panel__title {
  margin: 0 0 18px;
  font-size: 18px;
  color: #0f172a;
}

.number-form__row {
  margin-bottom: 18px;
}

.number-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 8px;
}

.number-range {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.number-range input {
  width: 120px;
  max-width: 100%;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 16px;
}

.number-range__sep {
  color: #64748b;
}

.number-fieldset {
  border: none;
  margin: 0 0 18px;
  padding: 0;
}

.number-fieldset .number-label {
  margin-bottom: 10px;
}

.number-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
}

.number-radio {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  color: #334155;
  cursor: pointer;
}

.number-radio--div input[type="number"] {
  width: 72px;
  padding: 6px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 14px;
}

.number-radio--div input[type="number"]:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.number-form select {
  min-width: 120px;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 16px;
}

.number-hint {
  margin: 8px 0 0;
  font-size: 13px;
  color: #64748b;
  line-height: 1.5;
}

.number-form__err {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 14px;
}

.number-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 132px;
  padding: 11px 20px;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.number-btn--primary {
  background: var(--site-accent);
  color: #fff;
}

.number-btn--primary:hover {
  background: #e67800;
}

.number-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.number-run-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 16px;
}

.number-back {
  font-size: 14px;
  color: #0f766e;
  text-decoration: none;
  font-weight: 600;
}

.number-run-summary {
  margin: 0;
  font-size: 13px;
  color: #64748b;
  text-align: right;
  flex: 1 1 200px;
}

.number-display {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  align-items: center;
  min-height: 120px;
  padding: 28px 16px;
  margin-bottom: 18px;
  border-radius: 14px;
  background: linear-gradient(180deg, #f0fdfa 0%, #ecfdf5 100%);
  border: 2px solid #99f6e4;
}

.number-display__placeholder {
  color: #64748b;
  font-size: 15px;
}

.number-display__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 14px 18px;
  border-radius: 12px;
  background: #fff;
  border: 2px solid #14b8a6;
  font-size: 32px;
  font-weight: 700;
  color: #0f766e;
  box-shadow: 0 6px 16px rgba(15, 118, 110, 0.12);
}

.number-run-actions {
  text-align: center;
  margin-bottom: 22px;
}

.number-history {
  border-top: 1px solid #e2e8f0;
  padding-top: 16px;
}

.number-history__title {
  margin: 0 0 12px;
  font-size: 16px;
  color: #0f172a;
}

.number-history__list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 280px;
  overflow-y: auto;
}

.number-history__batch {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 10px 0;
  border-bottom: 1px dashed #e2e8f0;
  font-size: 14px;
}

.number-history__batch-no {
  color: #64748b;
  flex: 0 0 auto;
}

.number-history__batch-vals {
  color: #0f172a;
  font-weight: 600;
  word-break: break-all;
}

.number-hint--history {
  margin-top: 10px;
}

.number-modal[hidden] {
  display: none !important;
}

.number-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.number-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.number-modal__box {
  position: relative;
  z-index: 1;
  width: min(360px, 100%);
  padding: 24px 22px;
  border-radius: 14px;
  background: #fff;
  text-align: center;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
}

.number-modal__box h3 {
  margin: 0 0 10px;
  font-size: 20px;
  color: #0f172a;
}

.number-modal__box p {
  margin: 0 0 18px;
  font-size: 14px;
  color: #64748b;
  line-height: 1.55;
}

.number-ad-slot {
  max-width: 720px;
  margin: 0 auto 24px;
  padding: 0 16px;
  text-align: center;
}

@media (max-width: 560px) {
  .number-tool-hero h1 {
    font-size: 24px;
  }

  .number-display__item {
    font-size: 26px;
    min-width: 64px;
    padding: 12px 14px;
  }

  .number-run-summary {
    text-align: left;
  }
}
