* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial,
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: #f5f6f8;
  color: #111827;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

.legal-chrome header {
  background: linear-gradient(180deg, #eff6ff 0%, #f8fafc 100%);
  color: #111827;
  padding: 28px 20px 20px;
  text-align: center;
  border-bottom: 1px solid #e5e7eb;
}

.legal-chrome header h1 {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #111827;
}

.legal-chrome header p {
  font-size: 13px;
  color: #6b7280;
  margin-top: 8px;
  line-height: 1.5;
}

.legal-chrome .lang-switcher {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px 14px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}

.lang-btn {
  padding: 7px 18px;
  border-radius: 999px;
  border: 1px solid #bfdbfe;
  background: #fff;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.lang-btn.active,
.lang-btn:hover {
  background: #2563eb;
  border-color: #2563eb;
  color: #fff;
}

.lang-content {
  display: none;
}

.lang-content.active {
  display: block;
}

.container {
  max-width: 800px;
  margin: 24px auto 32px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 8px 24px rgba(15, 23, 42, 0.06);
  padding: 36px 40px;
}

.intro {
  background: #eff6ff;
  border-left: 4px solid #2563eb;
  border-radius: 8px;
  padding: 16px 18px;
  margin-bottom: 28px;
  font-size: 14px;
  color: #374151;
}

.meta {
  font-size: 13px;
  color: #6b7280;
  margin-bottom: 20px;
}

.toc {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 16px 18px;
  margin-bottom: 28px;
}

.toc p {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 8px;
  color: #111827;
}

.toc ol {
  padding-left: 20px;
}

.toc ol li {
  font-size: 13px;
  color: #4b5563;
  margin-bottom: 4px;
}

.toc ol li a {
  color: #2563eb;
  text-decoration: none;
}

.toc ol li a:hover {
  text-decoration: underline;
}

h2 {
  font-size: 17px;
  font-weight: 700;
  color: #111827;
  margin: 28px 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid #f3f4f6;
}

h3 {
  font-size: 15px;
  font-weight: 600;
  color: #1f2937;
  margin: 18px 0 8px;
}

p {
  font-size: 14px;
  color: #374151;
  margin-bottom: 10px;
}

ul {
  padding-left: 20px;
  margin-bottom: 10px;
}

ul li {
  font-size: 14px;
  color: #374151;
  margin-bottom: 6px;
}

.highlight {
  font-weight: 600;
  color: #111827;
}

.important {
  background: #fffbeb;
  border-left: 4px solid #f59e0b;
  border-radius: 8px;
  padding: 14px 16px;
  margin: 16px 0;
  font-size: 14px;
  color: #374151;
}

.device-table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0 18px;
  font-size: 13px;
}

.device-table th {
  background: #eff6ff;
  color: #1e40af;
  font-weight: 700;
  padding: 11px 14px;
  text-align: left;
  border: 1px solid #dbeafe;
}

.device-table td {
  padding: 11px 14px;
  border: 1px solid #e5e7eb;
  color: #374151;
  vertical-align: top;
  word-break: break-word;
}

.device-table tr:nth-child(even) td {
  background: #f9fafb;
}

.device-table code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  background: #f3f4f6;
  padding: 1px 5px;
  border-radius: 4px;
}

.contact-box {
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 18px 20px;
  margin-top: 12px;
}

.contact-box p {
  margin: 6px 0;
}

a {
  color: #2563eb;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

footer {
  text-align: center;
  font-size: 12px;
  color: #9ca3af;
  padding: 8px 20px 36px;
}

/* App WebView (embedded=1): hide duplicate title, keep language switcher */
html.legal-embedded .legal-chrome header {
  display: none;
}

html.legal-embedded .legal-chrome .lang-switcher {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: 10px 16px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

html.legal-embedded .container {
  margin-top: 8px;
  border-radius: 0;
  box-shadow: none;
}

html.legal-embedded body {
  background: #f5f6f8;
}

@media (max-width: 720px) {
  .container {
    margin: 12px;
    padding: 22px 18px;
    border-radius: 12px;
  }

  .device-table thead {
    display: none;
  }

  .device-table,
  .device-table tbody,
  .device-table tr,
  .device-table td {
    display: block;
    width: 100%;
  }

  .device-table tbody tr {
    margin-bottom: 12px;
    padding: 14px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
  }

  .device-table td {
    border: none;
    padding: 8px 0;
  }

  .device-table td::before {
    content: attr(data-label);
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #6b7280;
    margin-bottom: 5px;
  }

  .device-table td.platform-cell {
    padding-bottom: 10px;
    margin-bottom: 6px;
    border-bottom: 1px solid #f3f4f6;
  }

  .device-table td.platform-cell::before {
    display: none;
  }

  .device-table td.platform-cell strong {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    color: #1d4ed8;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
  }

  .device-table td.purpose-cell {
    background: #f8fafc;
    margin-top: 4px;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
  }

  .device-table td.purpose-cell::before {
    color: #2563eb;
  }

  .device-table td.purpose-cell,
  .device-table td.identifiers-cell {
    font-size: 13px;
    line-height: 1.6;
  }
}

@media (max-width: 480px) {
  .legal-chrome header h1 {
    font-size: 20px;
  }

  .lang-btn {
    padding: 6px 14px;
    font-size: 12px;
  }
}
