.privilege-terms-page {
  color: #292925;
  background: #fff9f4;
  font-family: "Noto Sans Thai", Tahoma, Arial, sans-serif;
}

.privilege-terms-page .terms-container {
  width: min(100% - 32px, var(--site-content-width));
  margin-inline: auto;
}

.privilege-terms-page .site-menu-link[aria-current="page"] {
  color: #af9f2d;
}

.terms-banner-section {
  padding-top: 24px;
}

.terms-banner-carousel {
  overflow: hidden;
  border-radius: 18px;
  background: #ffdbc0;
}

.terms-banner-carousel picture,
.terms-banner-carousel img {
  display: block;
  width: 100%;
}

.terms-banner-carousel img {
  height: auto;
}

.terms-banner-carousel .carousel-control-prev,
.terms-banner-carousel .carousel-control-next {
  width: 9%;
}

.terms-banner-carousel [hidden] {
  display: none !important;
}

.terms-content-section {
  padding: 40px 0 64px;
}

.terms-content {
  padding: clamp(24px, 4vw, 54px);
  border: 1px solid #f0e8df;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 10px 32px rgba(85, 64, 42, .055);
  font-size: 17px;
  line-height: 1.85;
}

.terms-content h1 {
  margin: 0 0 22px;
  color: #af9f2d;
  font-size: clamp(28px, 3vw, 40px);
  font-weight: 700;
  line-height: 1.35;
}

.terms-content .terms-gift {
  margin: 0 0 32px;
  color: #be4e2c;
  font-size: clamp(18px, 2vw, 24px);
  line-height: 1.55;
}

.terms-content h2 {
  margin: 32px 0 12px;
  color: #292925;
  font-size: clamp(21px, 2vw, 27px);
  font-weight: 700;
}

.terms-content ol {
  margin: 0;
  padding-left: 1.7em;
}

.terms-content li {
  padding-left: .25em;
  margin-bottom: 14px;
}

.terms-content li::marker {
  color: #af9f2d;
  font-weight: 700;
}

.terms-content .terms-sublist {
  margin-top: 14px;
  counter-reset: subterm;
  list-style: none;
  padding-left: 0;
}

.terms-content .terms-sublist li {
  position: relative;
  padding-left: 2.5em;
  counter-increment: subterm;
}

.terms-content .terms-sublist li::before {
  position: absolute;
  left: 0;
  color: #af9f2d;
  font-weight: 700;
  content: "1." counter(subterm);
}

.terms-content a:not(.terms-back-button) {
  color: #be4e2c;
  overflow-wrap: anywhere;
}

.terms-content .terms-contact {
  margin-top: 32px;
  padding-top: 14px;
  border-top: 1px solid #efe9e1;
}

.terms-content .terms-contact p {
  margin: 0 0 30px;
}

.terms-back-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  border-radius: 999px;
  background: #af9f2d;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  line-height: 1.5;
  transition: background-color .2s ease;
}

.terms-back-button:hover,
.terms-back-button:focus-visible {
  background: #be4e2c;
  color: #fff;
}

.terms-footer {
  padding: 22px 0;
  border-top: 1px solid #e9e1d9;
  background: #fff;
  color: #5e5b54;
}

.terms-footer .terms-container {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.terms-footer a {
  color: #af9f2d;
}

@media (max-width: 767.98px) {
  .terms-banner-section { padding-top: 16px; }
  .terms-banner-carousel { border-radius: 12px; }
  .terms-content-section { padding: 20px 0 40px; }
  .terms-content { font-size: 15px; line-height: 1.75; }
  .terms-content li { margin-bottom: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .terms-back-button { transition: none; }
}
