/* หน้าข้อกำหนดการใช้งาน (/tos) — แบนเนอร์โปสเตอร์ + โลโก้ + เอกสารในการ์ด โทนชมพู→ฟ้า ของ Smoothie */
.tos-body {
  --tos-pink: var(--ex-pink, #f293d4);
  --tos-blue: var(--ex-blue, #6ebbf7);
  --tos-grad: linear-gradient(90deg, var(--tos-pink), var(--tos-blue));
  --tos-head: var(--nx-head, 'Kanit', 'IBM Plex Sans Thai', system-ui, sans-serif);
  color: #f5f5f5;
  background: #050406;
  position: relative;
  z-index: 0;
  min-height: 100vh;
  color-scheme: dark;
}

[data-l][hidden] {
  display: none !important;
}

/* ท้ายเว็บ: เป็นข้อความเฉย ๆ ไม่มีแถบพื้นหลัง */
html:not(#nx):not(#ex) .tos-body .sitefoot,
html:not(#nx):not(#ex) .tos-body .sitefoot-in {
  background: none !important;
  border: 0 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

.tos-body .sitefoot-in {
  justify-content: center !important;
  text-align: center;
}

/* ---------- ปุ่มสลับภาษา + ธีม (ลอยมุมขวาบน) ---------- */
.tos-tools {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tos-theme {
  display: grid !important;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 50% !important;
  background: rgba(10, 9, 12, 0.7) !important;
  color: #fff;
  cursor: pointer;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.tos-theme svg {
  width: 16px;
  height: 16px;
}

.tos-lang {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 3px;
  gap: 2px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(10, 9, 12, 0.7);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.tos-lang button {
  height: 26px;
  min-width: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: rgba(255, 255, 255, 0.55);
  font: 600 12px/1 var(--tos-head);
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.tos-lang button:hover {
  color: #fff;
}

.tos-lang button.on {
  background: var(--tos-grad);
  color: #141118;
}

/* ---------- แบนเนอร์ ---------- */
.tos-hero {
  position: relative;
  overflow: hidden;
  min-height: min(78vh, 720px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(56px, 9vw, 110px) 16px clamp(64px, 9vw, 110px);
  text-align: center;
  isolation: isolate;
}

.tos-hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  /* รูปที่สั่งทำ (ชายหาด Smoothie) — ด้านบนสดใส แล้วค่อย ๆ จางลงเป็นสีเข้ม */
  background:
    radial-gradient(55% 60% at 50% 55%, rgba(5, 4, 6, 0.55), transparent 75%),
    linear-gradient(180deg, rgba(5, 4, 6, 0.15) 0%, rgba(5, 4, 6, 0.35) 45%, rgba(5, 4, 6, 0.85) 80%, #050406 100%),
    url('/img/smoothiecommunitylaoding.jpg') 50% 20% / cover no-repeat;
}

/* พื้นหลังทั้งหน้า: รูปเดียวกันแบบเบลอ + มืด อยู่หลังการ์ดเอกสาร */
.tos-body::before {
  content: '';
  position: fixed;
  inset: -40px;
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(5, 4, 6, 0.82), rgba(5, 4, 6, 0.92)),
    url('/img/smoothiecommunitylaoding.jpg') 50% 30% / cover no-repeat;
  filter: blur(18px) saturate(1.2);
  pointer-events: none;
}

.tos-hero-in {
  max-width: 760px;
  margin: 0 auto;
}

.tos-logo {
  display: block;
  width: clamp(180px, 30vw, 300px);
  height: auto;
  margin: 0 auto 22px;
  filter: drop-shadow(0 12px 40px rgba(242, 147, 212, 0.35));
  animation: tosFloat 6s ease-in-out infinite;
}

@keyframes tosFloat {
  50% {
    transform: translateY(-6px);
  }
}

.tos-eyebrow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin: 0 0 14px;
  font: 600 13px/1 var(--tos-head);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  background: var(--tos-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.tos-eyebrow i {
  width: clamp(28px, 8vw, 80px);
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--tos-pink));
}

.tos-eyebrow i:last-child {
  background: linear-gradient(90deg, var(--tos-blue), transparent);
}

.tos-hero h1 {
  margin: 0 0 12px;
  font: 700 clamp(32px, 6vw, 56px)/1.15 var(--tos-head);
  color: #fff;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.tos-sub {
  margin: 0 auto 18px;
  max-width: 52ch;
  color: rgba(255, 255, 255, 0.75);
  font-size: 16px;
  line-height: 1.6;
}

.tos-sub b {
  color: #fff;
}

.tos-date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 7px 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(10, 9, 12, 0.6);
  font-size: 13px;
  color: rgba(255, 255, 255, 0.7);
}

.tos-date span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--tos-grad);
  box-shadow: 0 0 10px var(--tos-pink);
}

/* ---------- เนื้อหา ---------- */
.tos-wrap {
  position: relative;
  max-width: 860px;
  margin: -64px auto 0;
  padding: 0 16px 56px;
}

.tos-layout {
  position: relative;
  padding: clamp(22px, 4vw, 44px);
  border-radius: 28px;
  background:
    linear-gradient(180deg, rgba(242, 147, 212, 0.07), rgba(110, 187, 247, 0.05)),
    #0b0a0c;
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 0.9);
}

/* ขอบไล่สี ชมพู→ฟ้า */
.tos-layout::before {
  content: '';
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(242, 147, 212, 0.55), rgba(110, 187, 247, 0.25) 40%, rgba(255, 255, 255, 0.04));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.tos-doc {
  line-height: 1.85;
  font-size: 15.5px;
}

.tos-doc section {
  padding: 4px 0 26px;
  scroll-margin-top: 24px;
}

.tos-doc section + section {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 26px;
}

.tos-doc h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 12px;
  font: 600 20px/1.35 var(--tos-head);
  color: #fff;
}

.tos-doc h2 span {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 11px;
  background: var(--tos-grad);
  color: #141118;
  font: 700 14px/1 var(--tos-head);
  box-shadow: 0 6px 18px -6px rgba(242, 147, 212, 0.7);
}

.tos-doc h3 {
  margin: 20px 0 6px;
  font: 600 15.5px/1.4 var(--tos-head);
  color: var(--tos-pink);
}

.tos-doc p,
.tos-doc ul {
  margin: 0 0 10px;
  color: rgba(255, 255, 255, 0.72);
}

.tos-doc ul {
  padding: 0;
  list-style: none;
}

.tos-doc li {
  position: relative;
  padding-left: 22px;
}

.tos-doc li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 0.78em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--tos-grad);
}

.tos-doc li + li {
  margin-top: 6px;
}

.tos-doc b {
  color: #fff;
  font-weight: 600;
}

.tos-doc a {
  color: var(--tos-pink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(242, 147, 212, 0.4);
}

.tos-doc a:hover {
  color: var(--tos-blue);
  text-decoration-color: currentColor;
}

/* ---------- คำถามที่พบบ่อย ---------- */
.tos-faq {
  margin: 0 0 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: rgba(217, 217, 217, 0.04);
  transition: border-color 0.2s, background 0.2s;
}

.tos-faq[open] {
  border-color: rgba(242, 147, 212, 0.4);
  background: rgba(242, 147, 212, 0.06);
}

.tos-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  list-style: none;
}

.tos-faq summary::-webkit-details-marker {
  display: none;
}

.tos-faq summary::after {
  content: '+';
  flex: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.15);
  font: 500 18px/1 var(--tos-head);
  color: var(--tos-pink);
  transition: transform 0.25s;
}

.tos-faq[open] summary::after {
  transform: rotate(45deg);
}

.tos-faq p {
  margin: 0;
  padding: 0 18px 16px;
}

@media (max-width: 640px) {
  .tos-tools {
    top: 10px;
    right: 10px;
  }

  .tos-layout {
    border-radius: 20px;
  }

  .tos-doc h2 {
    font-size: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tos-logo {
    animation: none;
  }
}
