#readProgress {
  position: fixed; top: 0; right: 0; height: 4px; width: 0%;
  background: linear-gradient(90deg, var(--primary, #6c3ef4), #3b82f6);
  z-index: 9999; transition: width .1s linear;
  border-radius: 0 0 4px 4px;
}

body { background-color: #f8fafc; }

.terms-hero {
  background: linear-gradient(135deg, var(--primary, #6c3ef4) 0%, #1e3a8a 100%);
  padding: 100px 0 80px; text-align: center; position: relative; overflow: hidden;
  border-radius: 0 0 40px 40px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.05);
  margin-bottom: 30px;
}
.terms-hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 70% 50%, rgba(255,255,255,.15) 0%, transparent 65%);
  pointer-events: none;
}
.terms-hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.25);
  color: #fff; padding: 6px 18px; border-radius: 50px;
  font-size: .85rem; font-weight: 600; margin-bottom: 20px;
}
.terms-hero h1 {
  font-size: clamp(2rem, 4vw, 3rem); font-weight: 900;
  color: #fff; margin: 0 0 15px;
  text-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.terms-hero p {
  color: rgba(255,255,255,.9); font-size: 1.1rem;
  max-width: 760px; margin: 0 auto 28px; line-height: 1.8;
}
.terms-meta {
  display: inline-flex; gap: 28px; flex-wrap: wrap; justify-content: center;
}
.terms-meta-item {
  display: flex; align-items: center; gap: 8px;
  color: rgba(255,255,255,.75); font-size: .85rem;
}
.terms-meta-item i { color: rgba(255,255,255,.7); }

.terms-layout {
  display: grid; grid-template-columns: 300px 1fr; gap: 40px;
  max-width: 1200px; margin: -40px auto 48px; padding: 0 20px 80px;
  align-items: start; position: relative; z-index: 10;
}
@media(max-width:900px) {
  .terms-layout { grid-template-columns: 1fr; margin-top: 0; }
  .terms-toc { display: none; }
}

.terms-toc {
  position: sticky; top: 100px; background: #fff;
  border: 1px solid #e2e8f0; border-radius: 20px;
  padding: 30px 25px; max-height: calc(100vh - 120px); overflow-y: auto;
  box-shadow: 0 10px 40px rgba(0,0,0,0.06);
}
.terms-toc::-webkit-scrollbar { width: 4px; }
.terms-toc::-webkit-scrollbar-thumb { background: var(--primary, #6c3ef4); border-radius: 4px; }

.toc-title {
  font-size: 1rem; font-weight: 800; color: #1e293b;
  margin-bottom: 20px; padding-bottom: 15px;
  border-bottom: 2px solid #f1f5f9;
}
.toc-list { list-style: none; padding: 0; margin: 0; }
.toc-list li { margin-bottom: 4px; }
.toc-list a {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 15px; border-radius: 12px;
  color: #475569; font-size: .95rem; font-weight: 600;
  text-decoration: none; transition: all .3s ease; line-height: 1.6;
  margin-bottom: 8px;
}
.toc-list a .toc-num {
  min-width: 24px; height: 24px;
  background: #f1f5f9; color: #64748b;
  border-radius: 50%; font-size: .75rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  transition: all .3s ease;
}
.toc-list a:hover {
  background: #f1f5f9; color: var(--primary, #6c3ef4);
  transform: translateX(-5px);
}
.toc-list a.active {
  background: var(--primary, #6c3ef4); color: #fff;
  box-shadow: 0 4px 15px rgba(108,62,244,0.3);
}
.toc-list a.active .toc-num {
  background: rgba(255,255,255,0.2); color: #fff;
}

.terms-content { min-width: 0; direction: rtl; }

.section-group-title {
  font-size: 1rem; font-weight: 800; color: var(--primary, #6c3ef4);
  margin: 40px 0 20px; padding-bottom: 10px;
  border-bottom: 2px solid #f1f5f9;
  display: flex; align-items: center; gap: 10px;
}

.terms-section {
  background: #fff; border: 1px solid #e2e8f0;
  border-radius: 20px; margin-bottom: 30px;
  overflow: hidden; transition: all .3s ease;
  box-shadow: 0 4px 15px rgba(0,0,0,0.03);
}
.terms-section:hover {
  border-color: rgba(108,62,244,.3);
  box-shadow: 0 10px 30px rgba(0,0,0,0.06);
}

.section-header {
  display: flex; align-items: center; gap: 16px;
  padding: 24px 28px; cursor: pointer; user-select: none;
  transition: background .2s;
}
.section-header:hover { background: rgba(108,62,244,.03); }
.section-icon {
  width: 44px; height: 44px;
  background: rgba(108,62,244,.1); border: 1px solid rgba(108,62,244,.2);
  border-radius: 12px; display: flex; align-items: center;
  justify-content: center; font-size: 1.1rem;
  color: var(--primary, #6c3ef4); flex-shrink: 0;
}
.section-title-wrap { flex: 1; }
.section-num {
  font-size: .7rem; font-weight: 700; color: var(--primary, #6c3ef4);
  letter-spacing: 1px; margin-bottom: 4px;
}
.section-title {
  font-size: 1.1rem; font-weight: 800; color: #1e293b; margin: 0;
}
.section-toggle {
  width: 32px; height: 32px;
  background: #f8fafc; border: 1px solid #e2e8f0;
  border-radius: 8px; display: flex; align-items: center;
  justify-content: center; color: #94a3b8;
  transition: all .25s; flex-shrink: 0;
}
.section-toggle i { transition: transform .25s; }
.terms-section.open .section-toggle i { transform: rotate(180deg); }
.terms-section.open .section-toggle { background: var(--primary, #6c3ef4); color: #fff; border-color: var(--primary, #6c3ef4); }

.section-body {
  max-height: 0; overflow: hidden;
  transition: max-height .35s ease, padding .35s ease;
}
.terms-section.open .section-body { max-height: 6000px; }
.section-body-inner {
  padding: 0 28px 28px;
  border-top: 1px solid #f1f5f9;
}
.section-body-inner p {
  color: #475569; line-height: 2; font-size: 1.05rem;
  font-weight: 500; margin-bottom: 14px;
}
.section-body-inner p:last-child { margin-bottom: 0; }
.section-body-inner h4 {
  color: #1e293b; font-size: 1rem; font-weight: 800;
  margin: 24px 0 12px;
}
.section-body-inner h5 {
  color: #334155; font-size: .92rem; font-weight: 700;
  margin: 18px 0 10px;
}

.info-box {
  background: rgba(108,62,244,.06);
  border-right: 3px solid var(--primary, #6c3ef4);
  border-radius: 0 12px 12px 0;
  padding: 16px 20px; margin: 16px 0;
  color: #475569; font-size: .95rem; font-weight: 500; line-height: 1.9;
}
.warning-box {
  background: rgba(245,158,11,.07);
  border-right: 3px solid #f59e0b;
  border-radius: 0 12px 12px 0;
  padding: 16px 20px; margin: 16px 0;
  color: #475569; font-size: .95rem; font-weight: 500; line-height: 1.9;
}
.info-box i, .warning-box i { margin-left: 8px; color: var(--primary, #6c3ef4); }
.warning-box i { color: #f59e0b; }

.terms-list {
  list-style: none; padding: 0; margin: 0;
}
.terms-list li {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 0; border-bottom: 1px solid #f1f5f9;
  color: #475569; font-size: .95rem; font-weight: 500; line-height: 1.85;
}
.terms-list li:last-child { border-bottom: none; }
.terms-list li::before {
  content: '\f058'; font-family: 'Font Awesome 6 Free';
  font-weight: 900; color: var(--primary, #6c3ef4);
  font-size: .8rem; margin-top: 4px; flex-shrink: 0;
}
.terms-list.warn li::before { content: '\f071'; color: #f59e0b; font-size: .8rem; margin-top: 4px; }

.support-table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  margin: 16px 0; border-radius: 12px; overflow: hidden;
  font-size: .9rem;
}
.support-table th {
  background: #f8fafc; color: #1e293b;
  font-weight: 800; padding: 14px 16px; text-align: right;
  border-bottom: 2px solid #e2e8f0;
}
.support-table td {
  padding: 12px 16px; color: #475569; font-weight: 500;
  border-bottom: 1px solid #f1f5f9;
}
.support-table tr:last-child td { border-bottom: none; }
.support-table tr:nth-child(even) td { background: #fafbfc; }

.policy-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  margin: 16px 0;
}
@media(max-width:600px) { .policy-grid { grid-template-columns: 1fr; } }
.policy-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 14px; padding: 18px;
  transition: border-color .3s, box-shadow .3s;
}
.policy-card:hover {
  border-color: rgba(108,62,244,.3);
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}
.policy-card strong {
  display: block; color: #1e293b;
  font-size: .88rem; font-weight: 800; margin-bottom: 8px;
}
.policy-card span {
  color: #475569; font-size: .85rem; font-weight: 500; line-height: 1.75;
}

#backToTop {
  position: fixed; bottom: 30px; left: 30px;
  width: 50px; height: 50px; border-radius: 50%;
  background: var(--primary, #6c3ef4); color: #fff; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; box-shadow: 0 4px 15px rgba(108,62,244,.4);
  opacity: 0; transform: translateY(20px);
  transition: all .3s ease; z-index: 999;
}
#backToTop.show { opacity: 1; transform: translateY(0); }
#backToTop:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(108,62,244,.5);
}

.mobile-toc-btn {
  display: none; align-items: center; gap: 10px;
  background: #fff; border: 1px solid #e2e8f0;
  color: var(--primary, #6c3ef4); padding: 14px 20px; border-radius: 12px;
  font-size: .95rem; font-weight: 700; cursor: pointer;
  margin-bottom: 24px; width: 100%;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
@media(max-width:900px) { .mobile-toc-btn { display: flex; } }
.mobile-toc-panel {
  display: none; background: #fff;
  border: 1px solid #e2e8f0; border-radius: 16px;
  padding: 24px; margin-bottom: 28px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.04);
}
.mobile-toc-panel.open { display: block; }

.section-body-inner .sub-list {
  list-style: none; padding: 0; margin: 0 0 14px;
}
.section-body-inner .sub-list li {
  position: relative; padding-right: 20px;
  color: #475569; font-size: .95rem; font-weight: 500;
  line-height: 1.9; margin-bottom: 6px;
}
.section-body-inner .sub-list li::before {
  content: '•'; position: absolute; right: 0;
  color: var(--primary, #6c3ef4); font-weight: 700;
}
