:root {
  --qc-safe-top: env(safe-area-inset-top, 0px);
  --qc-safe-right: env(safe-area-inset-right, 0px);
  --qc-safe-bottom: env(safe-area-inset-bottom, 0px);
  --qc-safe-left: env(safe-area-inset-left, 0px);
  color: #222;
  background: #f7f7f7;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

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

.agreement-header {
  position: sticky;
  top: 0;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  align-items: center;
  min-height: calc(52px + var(--qc-safe-top));
  padding: var(--qc-safe-top) calc(var(--qc-safe-right) + 8px) 0 calc(var(--qc-safe-left) + 8px);
  border-bottom: 1px solid #eeeeee;
  background: #ffffff;
}

.agreement-back {
  display: grid;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #222222;
  cursor: pointer;
  place-items: center;
}

.agreement-back::before {
  width: 10px;
  height: 10px;
  border-bottom: 2px solid currentColor;
  border-left: 2px solid currentColor;
  content: "";
  transform: rotate(45deg);
}

.agreement-title {
  overflow: hidden;
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.agreement-content {
  min-height: calc(100vh - 52px - var(--qc-safe-top));
  min-height: calc(100dvh - 52px - var(--qc-safe-top));
  padding: 20px calc(16px + var(--qc-safe-right)) calc(20px + var(--qc-safe-bottom))
    calc(16px + var(--qc-safe-left));
  background: #ffffff;
}

.agreement-content h1,
.agreement-content h2,
.agreement-content h3 {
  margin: 24px 0 12px;
  color: #111;
  line-height: 1.5;
}

.agreement-content h1 { font-size: 22px; }
.agreement-content h2 { font-size: 19px; }
.agreement-content h3 { font-size: 17px; }
.agreement-content p,
.agreement-content li { font-size: 15px; line-height: 1.8; }
.agreement-content ul,
.agreement-content ol { padding-left: 24px; }
.agreement-content table { width: 100%; margin: 16px 0; border-collapse: collapse; font-size: 13px; }
.agreement-content th,
.agreement-content td { padding: 8px; border: 1px solid #ddd; text-align: left; vertical-align: top; }
.agreement-content th { background: #f5f5f5; }
