.terms-link {
  color: #52428c;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.terms-back {
  margin-left: auto;
}

.terms-page {
  max-width: 900px;
  padding-bottom: 52px;
}

.terms-header {
  padding: clamp(30px, 6vw, 66px) 0 26px;
}

.terms-header h1 {
  margin: 0 0 10px;
  font-size: clamp(1.75rem, 5vw, 3.15rem);
  letter-spacing: -0.045em;
}

.terms-header p {
  color: #6b6477;
}

.terms-body {
  padding: clamp(18px, 5vw, 40px);
  border: 1px solid #dfe2ec;
  border-radius: 16px;
  background: white;
}

.terms-body section + section {
  margin-top: 1.7rem;
}

.terms-body h2 {
  margin: 0 0 0.5em;
  font-size: clamp(1.1rem, 3vw, 1.35rem);
  letter-spacing: 0;
}

.terms-body p {
  color: #474b5a;
  line-height: 1.85;
}

.terms-region {
  padding: 1rem 1.15rem;
  border-left: 3px solid #8272b5;
  border-radius: 8px;
  background: #f0effa;
}

.chat-standalone .chat-form .chat-terms-note,
.chat-standalone .auth-dialog .chat-terms-note {
  margin: 8px 0 0;
  color: #5e6577;
  font-size: 12px;
  line-height: 1.6;
}

.chat-standalone .chat-form .chat-terms-note {
  text-align: center;
}

body > .aimagic-login-notice {
  display: none;
}

body:has(#app .min-h-screen > .relative > .card-glass) > .aimagic-login-notice {
  display: block;
  padding: 0.65rem 1rem;
  background: #f0effa;
  border-bottom: 1px solid #dcd8eb;
  color: #49435b;
  text-align: center;
  font-size: 0.875rem;
  line-height: 1.6;
}

.aimagic-login-notice .terms-link {
  margin-inline-start: 0.4em;
  color: #52428c;
}

body:has(> .aimagic-login-notice)
  #app
  .min-h-screen:has(> .relative > .card-glass) {
  min-height: calc(100svh - 3rem);
}

.terms-directory {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

.terms-directory a {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid #ded5ed;
  border-radius: 8px;
  background: #fff;
  color: #52428c;
  font-size: 0.875rem;
  font-weight: 650;
}

.terms-directory a:hover {
  background: #f0effa;
}

.terms-body section {
  scroll-margin-top: 18px;
}

.terms-body p + p,
.terms-body ul + p {
  margin-top: 0.75rem;
}

.terms-body ul {
  margin: 0.65rem 0 0;
  padding-inline-start: 1.4rem;
  color: #474b5a;
  line-height: 1.8;
}

.terms-body li + li {
  margin-block-start: 0.45rem;
}

.terms-body li::marker {
  color: #795ca8;
}

.terms-limits {
  padding: 1rem 1.15rem;
  border: 1px solid #e3d9ef;
  border-radius: 8px;
  background: #f9f6fd;
}
.terms-body {
  box-shadow: 0 3px 18px #30285b05;
}
.terms-directory a {
  text-decoration: none;
}
.terms-page p {
  line-height: 1.8;
}
