/* Rich text / legal content page — dark theme, PC + H5 */

.rich-text-static {
  --rt-bg: #0f0f0f;
  --rt-text: #fff;
  --rt-muted: rgba(255, 255, 255, 0.55);
  --rt-panel-bg: rgba(255, 255, 255, 0.05);
  --rt-outline: rgba(255, 255, 255, 0.05);
  --rt-outline-strong: rgba(255, 255, 255, 0.1);
  --rt-accent: #ecd227;
  --rt-font: "PingFang SC", "Noto Sans SC", sans-serif;
  width: 100%;
  box-sizing: border-box;
  background: var(--rt-bg);
  color: var(--rt-text);
  font-family: var(--rt-font);
}

.rich-text-static *,
.rich-text-static *::before,
.rich-text-static *::after {
  box-sizing: border-box;
}

body.home-page.rich-text-page .page-main {
  gap: 0;
  padding: 0;
  max-width: none;
  width: 100%;
}

.rich-text-view {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: center;
}

.rich-text-inner {
  display: flex;
  width: 100%;
  flex-direction: column;
  align-items: stretch;
  gap: 30px;
}

.rich-text-crumb {
  margin: 0;
  font-size: 18px;
  font-weight: 400;
  line-height: 24px;
}

.rich-text-crumb__link {
  color: var(--rt-text);
}

.rich-text-crumb__current {
  color: var(--rt-muted);
}

.rich-text-panel {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 60px;
  background: var(--rt-panel-bg);
  border-radius: 24px;
  border: 1px solid var(--rt-outline);
  backdrop-filter: blur(2px);
  overflow: hidden;
}

.rich-text-panel__title {
  margin: 0;
  color: var(--rt-text);
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
}

.rich-text-panel__content {
  color: var(--rt-text);
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
}

.rich-text-panel__content p {
  margin: 0;
}

.rich-text-body {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.rich-text-body p,
.rich-text-body div,
.rich-text-body li {
  margin: 0;
  color: var(--rt-text);
  font-size: inherit;
  line-height: inherit;
}

.rich-text-body br + br {
  display: block;
  content: "";
  margin-top: 0;
}

.rich-text-body h1,
.rich-text-body h2,
.rich-text-body h3,
.rich-text-body h4 {
  margin: 18px 0 0;
  color: var(--rt-text);
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
}

.rich-text-body h1:first-child,
.rich-text-body h2:first-child,
.rich-text-body h3:first-child,
.rich-text-body h4:first-child {
  margin-top: 0;
}

.rich-text-body a {
  color: var(--rt-accent);
  text-decoration: none;
}

.rich-text-body a:hover {
  text-decoration: underline;
}

.rich-text-body ul,
.rich-text-body ol {
  margin: 0;
  padding-left: 1.2em;
}

/* ========== H5 ========== */
@media (max-width: 768px) {
  .rich-text-view {
    padding: 12px 16px 24px;
  }

  .rich-text-inner {
    gap: 18px;
  }

  .rich-text-crumb {
    font-size: 12px;
    line-height: 18px;
  }

  .rich-text-panel {
    padding: 24px 20px;
    border-radius: 18px;
    border-color: var(--rt-outline-strong);
    backdrop-filter: none;
  }

  .rich-text-panel__title {
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
  }

  .rich-text-panel__content {
    font-size: 12px;
    line-height: 18px;
  }

  .rich-text-body h1,
  .rich-text-body h2,
  .rich-text-body h3,
  .rich-text-body h4 {
    margin-top: 0;
    font-size: 12px;
    font-weight: 400;
    line-height: 18px;
  }
}

/* ========== PC ========== */
@media (min-width: 769px) {
  .rich-text-view {
    padding: 30px 200px 60px;
  }
}

@media (min-width: 769px) and (max-width: 1600px) {
  .rich-text-view {
    padding-left: 48px;
    padding-right: 48px;
  }

  .rich-text-panel {
    padding: 48px;
  }
}
