﻿:root {
    --bg0: #edf1f5;
    --bg1: #edf1f5;
    --surface: #ffffff;
    --surface-soft: #f7fafd;
    --stroke: #dbe6f2;
    --text: #172334;
    --muted: #5c6b80;
    --muted2: #7b889b;
    --brand: #2f7cf6;
    --brand2: #1fb78f;
    --warn: #c97a12;
    --danger: #d54b63;
    --shadow: 0 14px 32px rgba(23, 35, 52, .08);
    --radius: 4px;
}

* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
    color: var(--text);
    background: #edf1f5;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    position: relative;
    padding-bottom: calc(18px + env(safe-area-inset-bottom));
}

a {
    color: inherit;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.wrap {
    max-width: 760px;
    margin: 0 auto;
    padding: 16px 14px 22px;
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    padding: 4px 2px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 4px;
    background: linear-gradient(135deg, var(--brand), var(--brand2));
    box-shadow: 0 0 0 4px rgba(47, 124, 246, .12);
    flex: 0 0 auto;
}

.brand .t {
    font-weight: 950;
    font-size: 14px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ghost {
    border-radius: 4px;
    padding: 10px 12px;
    border: 1px solid var(--stroke);
    background: var(--surface);
    color: var(--text);
    font-weight: 850;
    cursor: pointer;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 6px 16px rgba(23, 35, 52, .06);
}

.ghost svg,
.banner .bicon svg,
.icon svg,
.chev {
    width: 16px;
    height: 16px;
    opacity: .9;
    filter: brightness(0) saturate(100%);
}

.card {
    border-radius: 4px;
    border: 1px solid var(--stroke);
    background: linear-gradient(180deg, #ffffff 0%, #f9fbfe 100%);
    box-shadow: var(--shadow);
    overflow: hidden;
    position: relative;
}

.card:before {
    content: "";
    position: absolute;
    inset: -2px;
    background: radial-gradient(220px 140px at 12% 16%, rgba(47, 124, 246, .08), transparent 60%), radial-gradient(280px 180px at 88% 10%, rgba(31, 183, 143, .08), transparent 62%);
    pointer-events: none;
}

.inner {
    position: relative;
    padding: 16px 16px 14px;
}

.title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

h1 {
    margin: 0;
    font-size: 20px;
}

.ver {
    padding: 6px 10px;
    border-radius: 4px;
    border: 1px solid #cfe0f2;
    background: #f3f8ff;
    color: #38628f;
    font-size: 12px;
    white-space: nowrap;
}

.lead {
    margin-top: 10px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.75;
}

.banner {
    margin-top: 14px;
    border-radius: 4px;
    border: 1px solid #f0d6a8;
    background: #fff8ec;
    padding: 12px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.banner .bicon {
    width: 36px;
    height: 36px;
    border-radius: 4px;
    border: 1px solid #f0d6a8;
    background: #fff3db;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

.banner .bicon svg {
    width: 18px;
    height: 18px;
}

.banner .btxt {
    min-width: 0;
    color: #7b5a20;
    font-size: 13px;
    line-height: 1.65;
}

.sections {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

details {
    border-radius: 4px;
    border: 1px solid var(--stroke);
    background: var(--surface);
    overflow: hidden;
}

summary {
    list-style: none;
    cursor: pointer;
    user-select: none;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

summary::-webkit-details-marker {
    display: none;
}

.sum-left {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    font-weight: 950;
    font-size: 14px;
}

.icon {
    width: 34px;
    height: 34px;
    border-radius: 4px;
    border: 1px solid #d8e5f2;
    background: #f4f8fd;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
}

.icon svg {
    width: 18px;
    height: 18px;
}

.chev {
    width: 18px;
    height: 18px;
    transition: transform .18s ease;
    flex: 0 0 auto;
}

details[open] .chev {
    transform: rotate(180deg);
}

.content {
    padding: 0 12px 12px;
    border-top: 1px solid #e5edf5;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.75;
}

.content ul {
    margin: 10px 0 0;
    padding-left: 18px;
}

.content li {
    margin: 6px 0;
}

.note {
    margin-top: 10px;
    border-radius: 4px;
    border: 1px solid #d8e5f2;
    background: var(--surface-soft);
    padding: 10px;
    color: #5a6980;
    font-size: 12.5px;
    line-height: 1.7;
}

.actions {
    margin-top: 14px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn {
    flex: 1;
    min-width: 140px;
    border-radius: 4px;
    padding: 11px 12px;
    border: 1px solid var(--stroke);
    background: var(--surface);
    color: var(--text);
    font-weight: 950;
    cursor: pointer;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    user-select: none;
    box-shadow: 0 8px 18px rgba(23, 35, 52, .06);
}

.btn.primary {
    background: linear-gradient(135deg, #2f7cf6, #49a0ff);
    border-color: #2f7cf6;
    color: #ffffff;
}

.btn svg {
    width: 16px;
    height: 16px;
    opacity: .92;
    filter: brightness(0) saturate(100%);
}

.btn.primary svg {
    filter: none;
}

.site-footer {
    margin-top: 18px;
    padding: 18px 12px calc(22px + env(safe-area-inset-bottom));
    text-align: center;
    font-size: 12px;
    color: var(--muted2);
}

.footer-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    line-height: 1.8;
}

.footer-links a {
    color: #4d647f;
    text-decoration: none;
    padding: 2px 4px;
}

.footer-links .sep {
    opacity: .45;
}

.footer-meta {
    margin-top: 10px;
    line-height: 1.6;
}

.footer-meta .slogan {
    margin-top: 4px;
    font-size: 11px;
    opacity: .8;
}

body.agreement-shell {
    padding: 68px 0 calc(92px + env(safe-area-inset-bottom));
}

body.agreement-shell .site-app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 90;
    width: 100%;
    background: rgba(255, 255, 255, .92);
    border-bottom: 1px solid rgba(219, 230, 242, .92);
    box-shadow: 0 8px 24px rgba(23, 35, 52, .06);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

body.agreement-shell .site-app-header-inner {
    max-width: 760px;
    min-height: 62px;
    margin: 0 auto;
    padding: calc(env(safe-area-inset-top, 0px) + 10px) 14px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

body.agreement-shell .site-app-logo {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
}

body.agreement-shell .site-app-logo-box {
    width: 36px;
    height: 36px;
    flex: 0 0 auto;
    border-radius: var(--radius);
    overflow: hidden;
    background: linear-gradient(135deg, var(--brand), var(--brand2));
}

body.agreement-shell .site-app-logo-box img {
    width: 100%;
    height: 100%;
    display: block;
}

body.agreement-shell .site-app-logo-text {
    min-width: 0;
    display: block;
}

body.agreement-shell .site-app-logo-text strong,
body.agreement-shell .site-app-logo-text small {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

body.agreement-shell .site-app-logo-text strong {
    color: var(--text);
    font-size: 16px;
    line-height: 1.1;
    font-weight: 900;
}

body.agreement-shell .site-app-logo-text small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.2;
}

body.agreement-shell .site-app-header-actions {
    flex: 0 0 auto;
}

body.agreement-shell .site-app-header-action {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 12px;
    border-radius: var(--radius);
    border: 1px solid #cfe0f2;
    background: #f3f8ff;
    color: #2d609a;
    font-size: 13px;
    font-weight: 850;
    white-space: nowrap;
}

body.agreement-shell .site-app-header-action:hover {
    background: #e9f3ff;
    color: var(--brand);
}

body.agreement-shell .app-tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 95;
    width: 100%;
    background: rgba(255, 255, 255, .96);
    border-top: 1px solid rgba(219, 230, 242, .96);
    box-shadow: 0 -12px 30px rgba(23, 35, 52, .10);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

body.agreement-shell .app-tabbar-inner {
    max-width: 760px;
    margin: 0 auto;
    padding: 6px 10px calc(6px + env(safe-area-inset-bottom, 0px));
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
}

body.agreement-shell .app-tab {
    min-width: 0;
    min-height: 52px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border-radius: var(--radius);
    color: #64748b;
    text-decoration: none;
    font-size: 11px;
    font-weight: 800;
}

body.agreement-shell .app-tab svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    stroke-width: 1.8;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}

body.agreement-shell .app-tab span {
    max-width: 100%;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

body.agreement-shell .app-tab:hover,
body.agreement-shell .app-tab.active {
    color: var(--brand);
    background: #f3f8ff;
}

/* footer compact mobile override */
@media (max-width: 640px) {
    body.agreement-shell .site-app-header-inner {
        min-height: 56px;
        padding: calc(env(safe-area-inset-top, 0px) + 8px) 6px 8px;
        gap: 8px;
    }

    body.agreement-shell .site-app-logo-box {
        width: 34px;
        height: 34px;
    }

    body.agreement-shell .site-app-logo-text small {
        max-width: 180px;
    }

    body.agreement-shell .site-app-header-action {
        min-height: 36px;
        padding: 0 10px;
    }

    body.agreement-shell .app-tabbar-inner {
        padding: 5px 6px calc(5px + env(safe-area-inset-bottom, 0px));
        gap: 2px;
    }

    body.agreement-shell .app-tab {
        min-height: 50px;
    }

    .site-footer {
        padding: 12px 8px calc(14px + env(safe-area-inset-bottom));
    }

    .law-note {
        margin-bottom: 6px !important;
        font-size: 11px;
        line-height: 1.25;
        white-space: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .footer-inner {
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .footer-links {
        justify-content: flex-start;
        flex-wrap: nowrap;
        gap: 4px;
        width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        line-height: 1.4;
        padding-bottom: 1px;
    }

    .footer-links a,
    .footer-links .sep {
        flex: 0 0 auto;
    }

    .footer-links a {
        padding: 1px 2px;
        font-size: 11px;
    }

    .footer-meta {
        display: flex;
        align-items: center;
        gap: 8px;
        flex-wrap: nowrap;
        width: 100%;
        margin-top: 0;
        white-space: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        line-height: 1.3;
        font-size: 11px;
    }

    .footer-meta > div {
        flex: 0 0 auto;
    }

    .footer-meta .slogan {
        margin-top: 0;
        font-size: 10px;
    }

    .law-note::-webkit-scrollbar,
    .footer-links::-webkit-scrollbar,
    .footer-meta::-webkit-scrollbar {
        display: none;
    }

    .login-footer {
        padding: 0 8px calc(env(safe-area-inset-bottom) + 14px);
    }

    .login-footer .footer-links {
        justify-content: flex-start;
        flex-wrap: nowrap;
        gap: 4px;
        width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        font-size: 11px;
        line-height: 1.4;
    }

    .login-footer .footer-links a,
    .login-footer .sep {
        flex: 0 0 auto;
    }

    .login-footer .footer-note {
        margin-top: 6px;
        font-size: 11px;
        line-height: 1.25;
        white-space: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .login-footer .footer-links::-webkit-scrollbar,
    .login-footer .footer-note::-webkit-scrollbar {
        display: none;
    }
}

/* background repeat guard */
body {
    background-repeat: no-repeat;
}


