*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  min-height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, "Noto Sans", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", sans-serif;
  background: #023fc4;
  color: #333;
  -webkit-font-smoothing: antialiased;
}

.page {
  min-height: 100vh;
  background: #023fc4;
  display: flex;
  flex-direction: column;
  padding-top: 0.75rem;
}

.content-card {
  flex: 1;
  margin: 0 0.75rem;
  background: #fff;
  border-radius: 0.75rem;
  padding: 1rem;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
  position: relative;
}

.page-title-wrap {
  text-align: center;
  margin-bottom: 1rem;
}

.page-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #333;
  line-height: 1.4;
}

.rules-body {
  flex: 1;
  overflow: auto;
  padding-right: 0.25rem;
  padding-bottom: 1rem;
  text-align: left;
}

.page-bottom-spacer {
  height: 2rem;
  flex-shrink: 0;
}

.rule-section + .rule-section {
  margin-top: 1.5rem;
}

.rule-title {
  font-size: 16px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 0.5rem;
}

.rule-line {
  font-size: 14px;
  line-height: 1.8;
  color: #4b5563;
  text-align: left;
  margin-bottom: 0.5rem;
}

.bold-line {
  font-weight: 600;
}

.rule-table {
  margin-top: 0.25rem;
  margin-bottom: 0.25rem;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  background: #f9fafb;
}

.table-title {
  font-size: 13px;
  font-weight: 600;
  color: #1f2937;
  padding: 0.25rem 0.75rem;
}

.table-header,
.table-row {
  display: grid;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
}

.table-header {
  background: #e5efff;
  font-weight: 600;
  color: #1d4ed8;
}

.table-row:nth-child(odd) {
  background: #ffffff;
}

.table-row:nth-child(even) {
  background: #f3f4f6;
}

.table-header span,
.table-row span {
  font-size: 13px;
  color: #374151;
  word-break: break-word;
}

.columns-1 {
  grid-template-columns: 1fr;
}

.columns-2 {
  grid-template-columns: 1fr 1fr;
}

.columns-3 {
  grid-template-columns: 1fr 1fr 1fr;
}

.columns-4 {
  grid-template-columns: 1fr 1fr 1fr 1fr;
}

.columns-auto {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

@media (max-width: 480px) {
  .rule-title {
    font-size: 15px;
  }

  .rule-line {
    font-size: 13px;
  }

  .table-header,
  .table-row {
    padding: 0.65rem 0.75rem;
  }

  .table-header span,
  .table-row span {
    font-size: 12px;
  }

  .columns-3 {
    grid-template-columns: 1fr 1fr 1.3fr;
  }

  .columns-4 {
    grid-template-columns: 1fr 1fr 1fr 1.3fr;
  }
}

@media (max-width: 375px) {
  .rule-section + .rule-section {
    margin-top: 1.25rem;
  }

  .rule-title {
    font-size: 14px;
  }

  .rule-line {
    font-size: 12px;
  }

  .table-header span,
  .table-row span {
    font-size: 11px;
  }
}
