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

html[dir="rtl"] body {
    text-align: right;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans TC', Roboto, sans-serif;
    background: #fafafa;
    color: #18181b;
    line-height: 1.7;
    padding: 20px 16px 48px;
}

.legal-shell {
    max-width: 720px;
    margin: 0 auto;
}

.legal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.back {
    font-size: 14px;
    font-weight: 500;
    color: #2563eb;
    text-decoration: none;
}

.back:hover {
    text-decoration: underline;
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    background: #fff;
    border: 1px solid #e4e4e7;
    border-radius: 999px;
}

.lang-btn {
    min-width: 34px;
    padding: 5px 9px;
    font-size: 11px;
    font-weight: 600;
    font-family: inherit;
    color: #71717a;
    background: transparent;
    border: none;
    border-radius: 999px;
    cursor: pointer;
}

.lang-btn.is-active {
    color: #18181b;
    background: #f4f4f5;
}

h1 {
    font-size: 28px;
    margin-bottom: 8px;
}

.updated {
    color: #71717a;
    font-size: 13px;
    margin-bottom: 28px;
}

h2 {
    font-size: 16px;
    margin: 24px 0 8px;
    color: #18181b;
}

p, li {
    font-size: 14px;
    color: #3f3f46;
    margin-bottom: 10px;
}

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

html[dir="rtl"] ul {
    padding-left: 0;
    padding-right: 20px;
}

.notice {
    margin: 20px 0;
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #e4e4e7;
    border-left: 3px solid #ef4444;
    border-radius: 6px;
    font-size: 13px;
}

html[dir="rtl"] .notice {
    border-left: 1px solid #e4e4e7;
    border-right: 3px solid #ef4444;
}

.notice-strong {
    font-size: 14px;
    font-weight: 600;
    color: #18181b;
}

.highlight {
    margin: 24px 0;
    padding: 18px 20px;
    background: #fff;
    border: 1px solid #e4e4e7;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.highlight h2 {
    margin: 0 0 10px;
    font-size: 18px;
}

.highlight p {
    margin-bottom: 8px;
}

.legal-footer {
    margin-top: 32px;
    font-size: 12px;
    color: #a1a1aa;
    display: flex;
    flex-wrap: wrap;
    gap: 6px 12px;
}

.legal-footer a {
    color: #52525b;
    text-decoration: none;
}

.legal-footer a:hover {
    color: #18181b;
    text-decoration: underline;
}

html.legal-embed body {
    padding-top: 12px;
}

html.legal-embed .legal-header .back {
    display: none;
}

html.legal-embed .legal-header {
    justify-content: flex-end;
    margin-bottom: 12px;
}

html.legal-embed .legal-footer a {
    pointer-events: auto;
}
