*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  width: 100%;
  min-height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  background: #ffffff;
}

button {
  font: inherit;
  border: none;
  outline: none;
  background: none;
}

.legal-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: #ffffff;
}

.legal-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: env(safe-area-inset-top, 0) 16px 0;
  background: #ffffff;
  border-bottom: 1px solid #efeff1;
}

.legal-back {
  position: absolute;
  left: 16px;
  top: calc(env(safe-area-inset-top, 0) + 10px);
  width: 24px;
  height: 24px;
  cursor: pointer;
}

.legal-back::before {
  content: '';
  position: absolute;
  left: 7px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-left: 2px solid #333333;
  border-bottom: 2px solid #333333;
  transform: rotate(45deg);
}

.legal-title {
  font-size: 17px;
  font-weight: 600;
  color: #333333;
  line-height: 44px;
  padding: 0 48px;
  text-align: center;
}

.legal-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.legal-content {
  padding: 16px 20px calc(24px + env(safe-area-inset-bottom, 0));
  font-size: 14px;
  line-height: 22px;
  color: #333333;
  word-break: break-word;
}

.legal-content.is-empty,
.legal-content.is-loading {
  color: #9a9a9a;
}

.legal-content img {
  max-width: 100%;
  height: auto;
}

.legal-content p {
  margin-bottom: 12px;
}

.legal-content h1,
.legal-content h2,
.legal-content h3 {
  margin: 16px 0 8px;
  font-size: 16px;
  line-height: 24px;
}

@media (min-width: 480px) {
  .legal-body {
    max-width: 420px;
    margin: 0 auto;
  }
}
