:root {
    color-scheme: light;
    --bg: #f5f7fb;
    --card: #ffffff;
    --card-soft: #fbfcff;
    --text: #172033;
    --heading: #121826;
    --subheading: #243044;
    --body-text: #3d485a;
    --strong-text: #111827;
    --muted: #687083;
    --line: #dfe7f3;
    --primary: #3380fc;
    --primary-soft: #eef5ff;
    --warn: #9f5b00;
    --notice-text: #3a4658;
    --pill-bg: #ffffff;
    --pill-border: #dbe4f0;
    --pill-text: #4d5b70;
    --table-head: #f3f7fc;
    --radius: 17px;
}

:root.app-dark {
    color-scheme: dark;
    --bg: #0d1118;
    --card: #171c26;
    --card-soft: #111722;
    --text: #eef3fb;
    --heading: #f7f9fd;
    --subheading: #d8e1ee;
    --body-text: #d0d8e5;
    --strong-text: #ffffff;
    --muted: #9aa7b8;
    --line: #2a3444;
    --primary: #78aaff;
    --primary-soft: #17243a;
    --warn: #f0b35b;
    --notice-text: #d7deea;
    --pill-bg: #1c2431;
    --pill-border: #303b4d;
    --pill-text: #c8d3e2;
    --table-head: #1b2432;
}

@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
        --bg: #0d1118;
        --card: #171c26;
        --card-soft: #111722;
        --text: #eef3fb;
        --heading: #f7f9fd;
        --subheading: #d8e1ee;
        --body-text: #d0d8e5;
        --strong-text: #ffffff;
        --muted: #9aa7b8;
        --line: #2a3444;
        --primary: #78aaff;
        --primary-soft: #17243a;
        --warn: #f0b35b;
        --notice-text: #d7deea;
        --pill-bg: #1c2431;
        --pill-border: #303b4d;
        --pill-text: #c8d3e2;
        --table-head: #1b2432;
    }
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

body {
    padding: 18px 14px calc(28px + env(safe-area-inset-bottom));
}

.shell {
    width: 100%;
    max-width: 860px;
    margin: 0 auto;
}

.top {
    margin-bottom: 14px;
}

h1 {
    margin: 0 0 8px;
    color: var(--heading);
    font-size: 24px;
    line-height: 1.3;
}

h2 {
    margin: 0 0 12px;
    color: var(--heading);
    font-size: 18px;
    line-height: 1.45;
}

h3 {
    margin: 18px 0 8px;
    color: var(--subheading);
    font-size: 15px;
    line-height: 1.55;
}

p,
li,
td,
th {
    color: var(--body-text);
    font-size: 14px;
    line-height: 1.82;
}

p {
    margin: 9px 0;
}

ul {
    margin: 8px 0 0;
    padding-left: 22px;
}

li + li {
    margin-top: 5px;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.desc {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.7;
}

.meta,
.policy-links, .links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.pill,
.policy-link, .link {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 10px;
    border: 1px solid var(--pill-border);
    border-radius: 999px;
    background: var(--pill-bg);
    color: var(--pill-text);
    font-size: 12px;
    line-height: 1.4;
}

.policy-link, .link {
    color: var(--primary);
    font-weight: 600;
}

.notice,
section {
    margin-bottom: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--card);
    box-shadow: 0 5px 18px rgba(31, 56, 92, 0.04);
}

.notice {
    padding: 14px 16px;
    color: var(--notice-text);
    font-size: 14px;
    line-height: 1.8;
}

.notice strong,
.sensitive {
    color: var(--warn);
}

section {
    padding: 18px 18px 16px;
}

.summary-grid, .rights-grid, .rule-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 12px 0 4px;
}

.summary-card, .rights-card, .rule-card {
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--card-soft);
}

.summary-card strong, .rights-card strong, .rule-card strong {
    display: block;
    margin-bottom: 4px;
    color: var(--strong-text);
    font-size: 14px;
}

.summary-card span, .rights-card span, .rule-card span {
    display: block;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.65;
}

.table-wrap {
    overflow-x: auto;
    margin-top: 12px;
    border: 1px solid var(--line);
    border-radius: 13px;
}

table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    background: var(--card-soft);
}

@media (min-width: 641px) {
    .sdk-table { table-layout: fixed; }
    .sdk-table th:nth-child(1) { width: 23%; }
    .sdk-table th:nth-child(2) { width: 21%; }
    .sdk-table th:nth-child(3) { width: 36%; }
    .sdk-table th:nth-child(4) { width: 20%; }
    .sdk-table td { overflow-wrap: anywhere; }
}

th,
td {
    padding: 11px 12px;
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

th {
    background: var(--table-head);
    color: var(--strong-text);
    font-size: 13px;
    font-weight: 700;
}

th:last-child,
td:last-child {
    border-right: 0;
}

tr:last-child td {
    border-bottom: 0;
}

.purpose {
    color: var(--strong-text);
    font-weight: 600;
}

.callout {
    margin: 12px 0;
    padding: 12px 13px;
    border-left: 3px solid var(--primary);
    border-radius: 8px;
    background: var(--primary-soft);
}

.callout p {
    margin: 0;
}

.contact-box {
    margin-top: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--card-soft);
}

.contact-box strong {
    color: var(--strong-text);
}

.footer {
    padding: 8px 4px 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.75;
    text-align: center;
}

@media (max-width: 640px) {
    body {
        padding: 16px 12px calc(24px + env(safe-area-inset-bottom));
    }

    h1 {
        font-size: 22px;
    }

    section {
        padding: 15px 13px;
    }

    .summary-grid, .rights-grid, .rule-grid {
        grid-template-columns: 1fr;
    }

    .table-wrap {
        overflow: visible;
        border: 0;
    }

    table,
    thead,
    tbody,
    tr,
    th,
    td {
        display: block;
        min-width: 0;
        width: 100%;
    }

    thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    tr {
        margin-bottom: 10px;
        overflow: hidden;
        border: 1px solid var(--line);
        border-radius: 12px;
        background: var(--card-soft);
    }

    td {
        padding: 9px 11px;
        border-right: 0;
    }

    td::before {
        display: block;
        margin-bottom: 2px;
        color: var(--muted);
        font-size: 11px;
        font-weight: 700;
        line-height: 1.4;
        content: attr(data-label);
    }
}

a { overflow-wrap: anywhere; }
a:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
.strong, td.name { color: var(--strong-text); font-weight: 700; }
.collection .shell { max-width: 940px; }
.collection .notice { background: var(--primary-soft); }
@media (min-width: 641px) {
    .collection table { table-layout: fixed; }
    .collection th:nth-child(1) { width: 31%; }
    .collection th:nth-child(2) { width: 25%; }
    .collection th:nth-child(3) { width: 44%; }
    .collection td { overflow-wrap: anywhere; }
}

