body {
    font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
    font-size: 16px;
    max-width: 800px;
    margin: 0 auto;
    padding: 60px 24px;
    color: #4a3a5a;
    background: linear-gradient(180deg, #fdf4ff 0%, #f5ecfb 100%);
    min-height: 100vh;
    line-height: 1.85;
  }
  h1 { font-size: 28px;
    color: #6b4a8a;
    margin-bottom: 8px;
    text-align: center;
    background: linear-gradient(135deg, #ff6fa8, #a674f0);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
  }
  .legal-header {
    position: sticky;
    top: 0;
    z-index: 20;
    margin: -60px -24px 28px;
    padding: 6px 24px;
    background: linear-gradient(180deg, rgba(253,244,255,0.97) 0%, rgba(245,236,251,0.9) 100%);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px dashed #d8c4f0;
  }
  .legal-header h1 { margin: 0; font-size: 22px; line-height: 1.2; }
  .legal-meta {
    text-align: center;
    margin-bottom: 28px;
    padding-bottom: 20px;
    border-bottom: 1px dashed #d8c4f0;
  }
  .legal-meta .meta-line {
    display: inline-block;
    margin: 0 12px;
    font-size: 14px;
    color: #8a7898;
  }

  .legal-meta .meta-label {
    color: #b8a8c8;
    margin-right: 4px;
  }
  h2 {
    font-size: 20px;
    color: #6b4a8a;
    margin: 32px 0 14px;
    padding-left: 12px;
    border-left: 4px solid;
    border-image: linear-gradient(180deg, #ff6fa8, #a674f0) 1;
    scroll-margin-top: 20px;
  }
  h2.preface {
    border-image: none;
    border-left: 4px solid #d8c4f0;
    color: #8a6aaa;
  }
  h3 {
    font-size: 15px;
    color: #4a3a5a;
    margin: 16px 0 8px;
    font-weight: 600;
  }
  p {
    margin: 12px 0;
    text-indent: 2em;
    text-align: justify;
    font-size: 16px;
    color: #4a3a5a;
  }
  p.numbered {
    text-indent: 0;
    padding-left: 2.8em;
    position: relative;
  }
  p.numbered::before {
    content: attr(data-number) "、";
    position: absolute;
    left: 0;
    color: #8a6aaa;
    font-weight: 600;
  }
  p.toc-intro {
    text-indent: 0;
    color: #8a6aaa;
    font-weight: 600;
    margin: 24px 0 12px;
  }
  ol.toc {
    background: rgba(255, 200, 224, 0.15);
    border: 1px dashed #d8c4f0;
    border-radius: 8px;
    padding: 16px 16px 16px 36px;
    margin: 12px 0 28px;
  }
  ol.toc li {
    margin: 4px 0;
    font-size: 15px;
    line-height: 1.7;
  }
  ol.toc a {
    color: #6b4a8a;
    text-decoration: none;
    font-size: 15px;
    transition: color 0.2s;
  }
  ol.toc a:hover {
    color: #ff6fa8;
  }
  ol.legal-list {
    margin: 8px 0 16px;
    padding-left: 28px;
  }
  ol.legal-list li {
    margin: 6px 0;
    text-align: justify;
    font-size: 16px;
    line-height: 1.85;
  }
  .back {
    display: inline-block;
    margin-top: 40px;
    padding: 8px 18px;
    color: #ff6fa8;
    text-decoration: none;
    font-size: 14px;
    border: 1px solid #ffc8e0;
    border-radius: 20px;
    transition: background 0.2s;
  }
  .back:hover { background: #ffe8f3; }
  .back-wrap {
    text-align: center;
    margin-top: 40px;
  }
  .sdk-table {
    width: 100%;
    border-collapse: collapse;
    margin: 12px 0 24px;
    font-size: 13.5px;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid #e8d8f4;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(214, 184, 240, 0.18);
  }
  .sdk-table thead th {
    background: linear-gradient(135deg, #ffe0ee 0%, #ecd8fb 100%);
    color: #6b4a8a;
    font-weight: 600;
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid #e0c8ee;
    font-size: 14px;
  }
  .sdk-table tbody td {
    padding: 12px;
    border-bottom: 1px dashed #ead8f4;
    vertical-align: top;
    line-height: 1.7;
    color: #4a3a5a;
  }
  .sdk-table tbody tr:last-child td { border-bottom: none; }
  .sdk-table tbody tr:nth-child(even) td { background: rgba(252, 240, 252, 0.5); }
  .sdk-table .sdk-name {
    font-weight: 600;
    color: #6b4a8a;
  }
  .sdk-table .sdk-package {
    display: inline-block;
    margin-top: 4px;
    padding: 2px 8px;
    font-size: 12px;
    color: #8a6aaa;
    background: rgba(214, 184, 240, 0.18);
    border-radius: 4px;
    font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  }
  .sdk-table .plain-url {
    color: #a674f0;
    word-break: break-all;
    font-family: var(--font-mono);
    font-size: 12.5px;
    display: inline-block;
    padding: 2px 0;
    cursor: text;
  }
  @media (max-width: 900px) {
    /* === 全局 H5 适配 === */
    body {
      padding: 24px 16px;
      max-width: 100%;
      overflow-x: hidden;
      font-size: 15px;
      line-height: 1.78;
      -webkit-text-size-adjust: 100%;
      min-height: calc(var(--vh, 1vh) * 100);
      padding-left: max(16px, env(safe-area-inset-left));
      padding-right: max(16px, env(safe-area-inset-right));
      padding-bottom: max(40px, env(safe-area-inset-bottom));
    }
    h1 {
      font-size: 22px !important;
      line-height: 1.4;
    }
    h2 {
      font-size: 16.5px;
      margin: 26px 0 12px;
      padding: 8px 12px 8px 14px;
      scroll-margin-top: 70px;
      line-height: 1.5;
    }
    h2::before {
      height: 16px;
    }
    h3 {
      font-size: 14.5px;
      margin: 18px 0 8px;
    }
    p {
      font-size: 14.5px;
      margin: 10px 0;
      line-height: 1.78;
    }
    p.numbered {
      padding-left: 2.2em;
    }

    /* === 顶部 Header 紧凑化 === */
    .legal-header {
      padding: 8px 16px !important;
      margin: -24px -16px 14px !important;
      margin-left: max(-16px, calc(-1 * env(safe-area-inset-left))) !important;
      margin-right: max(-16px, calc(-1 * env(safe-area-inset-right))) !important;
    }
    .legal-header h1 {
      font-size: 17px !important;
    }
    .legal-meta {
      margin-bottom: 16px;
      padding-bottom: 14px;
    }
    .legal-meta .meta-line {
      display: block;
      margin: 4px 0;
      font-size: 12.5px;
    }
    .legal-meta .meta-label {
      margin-right: 6px;
    }

    /* === 目录适配 === */
    p.toc-intro {
      font-size: 13px;
      margin: 22px 0 10px;
    }
    ol.toc {
      padding: 10px 14px 10px 14px;
      border-radius: 6px;
    }
    ol.toc li {
      font-size: 13.5px;
      line-height: 1.6;
    }
    ol.toc a {
      font-size: 13.5px;
    }

    /* === 列表项优化 === */
    ol.legal-list {
      padding-left: 22px;
    }
    ol.legal-list li {
      font-size: 14px;
      line-height: 1.75;
    }

    /* === 返回链接 === */
    .back {
      padding: 7px 14px;
      font-size: 13px;
      margin-top: 28px;
    }
    .back-wrap {
      margin-top: 28px;
    }

    /* === SDK 表格 → 移动端卡片卡片化视图(覆盖所有手机及窄屏平板) === */
    .sdk-table-wrap {
      /* 横向滚动兜底:即使卡片化失效,也能滑动查看 */
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
      margin: 14px -16px 20px;
      padding: 0 16px;
    }
    .sdk-table,
    .sdk-table thead,
    .sdk-table tbody,
    .sdk-table tr,
    .sdk-table th,
    .sdk-table td {
      display: block;
      width: auto !important;
      min-width: 0;
    }
    .sdk-table thead {
      display: none;
    }
    .sdk-table,
    .sdk-table tbody tr,
    .sdk-table tbody td {
      background: transparent;
      border: none;
      padding: 0;
    }
    .sdk-table {
      margin: 0;
      background: transparent;
      box-shadow: none;
      border-radius: 0;
      min-width: 0;
    }
    .sdk-table tbody tr {
      margin-bottom: 14px;
      padding: 14px;
      background: rgba(255, 255, 255, 0.78);
      border: 1px solid #e8d8f4;
      border-radius: 10px;
      box-shadow: 0 2px 8px rgba(214, 184, 240, 0.15);
    }
    .sdk-table tbody tr:last-child {
      margin-bottom: 0;
    }
    .sdk-table tbody td {
      padding: 8px 0 !important;
      border-bottom: 1px dashed #f0e4f8 !important;
      line-height: 1.7;
      word-break: break-word;
      white-space: normal;
    }
    .sdk-table tbody td:last-child {
      border-bottom: none !important;
      padding-bottom: 0 !important;
    }
    .sdk-table tbody td::before {
      content: attr(data-label);
      display: block;
      font-size: 11.5px;
      font-weight: 700;
      color: #a674f0;
      margin-bottom: 6px;
      letter-spacing: 0.3px;
      text-transform: none;
    }
    .sdk-table tbody td:first-child {
      padding-top: 0 !important;
      padding-left: 4px !important;
      padding-right: 4px !important;
      border-bottom: 1px dashed #f0e4f8 !important;
      margin-bottom: 4px;
      border-radius: 6px;
      background: linear-gradient(135deg, rgba(255, 224, 238, 0.35) 0%, rgba(236, 216, 251, 0.35) 100%);
    }
    .sdk-table tbody td:first-child::before {
      color: #ff6fa8;
      margin-bottom: 8px;
    }
    .sdk-table .sdk-name {
      font-size: 15px;
      display: block;
      margin-bottom: 4px;
    }
    .sdk-table .sdk-package {
      font-size: 11.5px;
      word-break: break-all;
    }
    .sdk-table .plain-url {
      font-size: 13px;
    }
  }

  @media (max-width: 900px) and (max-height: 500px) and (orientation: landscape) {
    /* 横屏小屏优化 */
    body { padding: 16px 14px; }
    h2 { margin: 18px 0 8px; font-size: 15.5px; }
    p { font-size: 13.5px; }
  }

  @media (max-width: 360px) {
    /* 超小屏(如 iPhone SE)优化 */
    body { font-size: 14px; padding: 20px 14px; }
    h1 { font-size: 20px !important; }
    h2 { font-size: 15.5px; }
    p { font-size: 13.5px; }
    .sdk-table tbody tr { padding: 12px 12px 4px; }
  }

  /* === 全局触摸体验优化(适用于所有设备) === */
  a, button {
    -webkit-tap-highlight-color: rgba(255, 111, 168, 0.15);
  }
  ol.toc a, .back {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
  }
