/* ============================================================
   来华留学生办事指南 · rem 自适应样式
   基准：html { font-size: 5.208333vw } → 1rem = 100px @ 1920px
   所有尺寸按设计稿 1920 宽度 1:100 换算为 rem，随屏宽等比缩放
   ============================================================ */

html {
    font-size: 5.208333vw;
}

html,
body {
    margin: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #e8f4fb;
    font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
    color: #123d6b;
}

* {
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-size: .16rem;
    user-select: none;
}

a {
    color: inherit;
}

/* ===== 舞台（整屏 flex 纵向布局：标题栏 / 内容 / 底部工具栏） ===== */
#stage {
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #e8f4fb;
}

/* ===== 顶部标题栏 ===== */
.top {
    flex: none;
    position: relative;
    z-index: 5;
    display: flex;
    align-items: center;
    height: 2.05rem;
    background: #0c6eaf;
    overflow: hidden;
}

/* 标题栏底部浅蓝色分隔线 */
.top::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: .08rem;
    background: rgba(153, 218, 255, 1);
    pointer-events: none;
}

.top .brand {
    display: block;
    flex: none;
    width: 10.68rem;
    max-width: 13.6rem;
    height: auto;
    max-height: 78%;
    margin-left: .98rem;
    object-fit: contain;
    object-position: left center;
    pointer-events: none;
}

/* ===== 首页 ===== */
.home-wrap {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: .22rem .5rem;
    background: #e9f4fb url("../images/homebg.png") center calc(100% + .1rem) no-repeat;
    background-size: cover;
}

.home-grid {
    --gap-y: .92rem;
    --gap-x: .53rem;
    --card-w: 4.8rem;
    width: 100%;
    max-width: 15.6rem;
    display: flex;
    flex-wrap: wrap;
    align-content: center;
    justify-content: center;
    gap: var(--gap-y) var(--gap-x);
    margin-top: 2rem;
}

.home-card {
    position: relative;
    flex: 0 1 var(--card-w);
    width: var(--card-w);
    max-width: 100%;
    height: 2.05rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 .42rem;
    border-radius: .36rem 0 .36rem 0;
    text-decoration: none;
    color: #1b1b1b;
    background: linear-gradient(275.3deg, rgba(238, 243, 253, .18) 4.24%, rgba(217, 229, 239, .18) 44.47%, rgba(205, 220, 230, .18) 85.48%);
    border: .02rem solid rgba(255, 255, 255, .72);
    box-shadow: 0 .1rem .24rem rgba(30, 88, 152, .1);
    -webkit-backdrop-filter: blur(.03rem);
    backdrop-filter: blur(.03rem);
    transition: transform .22s ease, box-shadow .22s ease, background .22s ease;
}

/* 内侧细描边 */
.home-card::before {
    content: "";
    position: absolute;
    left: .13rem;
    right: .13rem;
    top: .13rem;
    bottom: .13rem;
    border: .02rem solid rgba(176, 203, 229, .5);
    border-radius: .25rem 0 .25rem 0;
    pointer-events: none;
}

.home-card:hover {
    background: linear-gradient(275.3deg, rgba(238, 243, 253, .34) 4.24%, rgba(217, 229, 239, .32) 44.47%, rgba(205, 220, 230, .32) 85.48%);
    box-shadow: 0 .16rem .35rem rgba(30, 88, 152, .16);
    transform: translateY(-.02rem);
}

.home-card:active {
    transform: translateY(.01rem) scale(.995);
}

.home-card .ico-box {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    height: .84rem;
    width: auto;
    aspect-ratio: 1 / 1;
    max-height: 68%;
    border-radius: 50%;
    overflow: hidden;
    background: #fff;
    border: .02rem solid rgba(255, 255, 255, .85);
    box-shadow: 0 .05rem .13rem rgba(30, 88, 152, .16);
}

.home-card .ico-box .ico {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.home-card .split {
    flex: none;
    width: .02rem;
    height: .84rem;
    max-height: 46%;
    margin: 0 .21rem 0 .31rem;
    background: rgba(24, 34, 48, .72);
}

.home-card .txt {
    min-width: 0;
    text-align: left;
}

.home-card strong {
    display: block;
    font-weight: 700;
    letter-spacing: .01em;
    font-size: .44rem;
    line-height: 1.18;
    color: #1b1b1b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.home-card em {
    display: block;
    margin-top: .1rem;
    font-style: normal;
    font-weight: 400;
    font-size: .3rem;
    line-height: 1.2;
    color: rgba(24, 34, 48, .82);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ico-text {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #2f7ec2;
    font-size: .35rem;
    font-weight: 700;
    font-style: normal;
}

/* ===== 内页 ===== */
body.page-inner {
    background: #eaf3fb;
}

body.page-inner #stage {
    background: linear-gradient(180deg, #f1f8fd 0%, #e4eff9 55%, #d9e9f7 100%);
}

.workspace {
    position: relative;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    align-items: stretch;
    padding: .3rem .88rem .15rem;
}

.side {
    width: max-content;
    flex: none;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
    position: relative;
    z-index: 4;
    padding: .15rem 0 .15rem .23rem;
}

.side-item {
    position: relative;
    display: flex;
    align-items: center;
    width: auto;
    align-self: stretch;
    height: 1.21rem;
    padding: 0 .48rem 0 1.16rem;
    border-radius: .36rem 0 .36rem 0;
    text-decoration: none;
    color: #1b2733;
    background: linear-gradient(275.3deg, rgba(238, 243, 253, .18) 4.24%, rgba(217, 229, 239, .18) 44.47%, rgba(205, 220, 230, .18) 85.48%);
    border: .02rem solid rgba(255, 255, 255, .72);
    box-shadow: 0 .1rem .24rem rgba(30, 88, 152, .1);
    -webkit-backdrop-filter: blur(.03rem);
    backdrop-filter: blur(.03rem);
    transition: transform .22s ease, box-shadow .22s ease, background .22s ease;
}

/* 内侧细描边 */
.side-item::before {
    content: "";
    position: absolute;
    left: .06rem;
    right: .06rem;
    top: .06rem;
    bottom: .06rem;
    border: .02rem solid rgba(176, 203, 229, .5);
    border-radius: .25rem 0 .25rem 0;
    pointer-events: none;
}

.side-text {
    flex: 1 1 auto;
    min-width: 0;
}

.side-text strong {
    display: block;
    font-weight: 700;
    letter-spacing: .02em;
    font-size: .24rem;
    line-height: 1.1;
    color: #1b2733;
    white-space: nowrap;
}

/* 中文标题下的细线 */
.side-text strong::after {
    content: "";
    display: block;
    width: .52rem;
    height: .01rem;
    margin-top: .05rem;
    background: rgba(140, 172, 202, .9);
}

.side-text em {
    display: block;
    margin-top: .05rem;
    font-style: normal;
    font-weight: 400;
    font-size: .19rem;
    line-height: 1.15;
    color: #1f2c3a;
    white-space: nowrap;
}

/* 圆形徽章图标：白圈 + 深蓝描边 */
.side-ico {
    position: absolute;
    left: -.34rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 1.15rem;
    width: auto;
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    background: #fff;
    border: .05rem solid #ffffff;
    box-shadow: 0 0 0 .03rem rgba(27, 71, 116, .78),
                0 .07rem .13rem rgba(30, 88, 152, .26);
    z-index: 2;
}

.side-ico .ico {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* 无图片时用首字母占位 */
.side-ico .ico-text,
.home-card .ico-box .ico-text {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* 错位排布：偶数项右移，尺寸保持一致 */
.side-item:nth-child(even) {
    transform: translateX(.69rem);
}

/* 选中：仅提亮背景，边框/圆角/尺寸完全不变 */
.side-item.active {
    background: linear-gradient(275.3deg, rgba(5, 107, 166, 0.18) 4.24%, rgba(255, 255, 255, 0.18) 44.47%, rgba(5, 107, 166, 0.18) 85.48%);
    box-shadow: 0 .16rem .35rem rgba(30, 88, 152, .2);
    z-index: 6;
}

.side-item.active .side-text strong {
    color: #14375c;
}

.panel {
    flex: 1 1 auto;
    min-width: 0;
    position: relative;
    z-index: 2;
    margin-left: 1.1rem;
    display: flex;
    flex-direction: column;
    border-radius: .25rem;
    border: .01rem solid rgba(255, 255, 255, .92);
    background: linear-gradient(180deg, rgba(255, 255, 255, .74) 0%, rgba(219, 234, 248, .68) 100%);
    box-shadow: 0 .15rem .35rem rgba(30, 88, 152, .12);
    overflow: hidden;
}




.panel-head {
    position: relative;
    z-index: 1;
    flex: none;
    min-height: .84rem;
    padding: .21rem .48rem .1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .21rem;
    text-align: center;
    background: none;
    border-bottom: 0;
}

.panel-head span {
    max-width: 9.2rem;
    font-size: .35rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: .04em;
    color: #17456e;
}

.chev {
    flex: none;
    display: block;
    width: .25rem;
    height: auto;
    opacity: .55;
}

.chev-left {
    transform: scaleX(-1);
}

.panel-body {
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 0 .69rem;
}

/* 一页 6 条：每行按剩余高度均分，任何屏宽下都完整显示 */
.list {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    
    overflow: hidden;
    padding: .12rem 0;
}

.list-item {
    display: flex;
    align-items: center;
    gap: .18rem;
    
    min-height: 0;
    padding: 0.25rem 0;
    overflow: hidden;
   
    border-bottom: .01rem dashed rgba(126, 174, 216, .8);
    text-decoration: none;
    color: #17456e;
    font-size: .28rem;
    font-weight: 600;
    letter-spacing: .02em;
}

.list-item:hover {
    background: rgba(255, 255, 255, .5);
}

.list-item:active {
    background: rgba(255, 255, 255, .85);
}

.doc {
    flex: none;
    display: block;
    width: .37rem;
    height: auto;
    opacity: .82;
}

.list-text {
    flex: 1 1 auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.go {
    flex: none;
    display: block;
    width: .4rem;
    height: auto;
    object-fit: contain;
}

.reader {
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    margin: .1rem 0 .24rem;
    padding: .08rem .24rem .08rem .08rem;
    color: #17456e;
    font-size: .22rem;
    line-height: 1.85;
    -webkit-overflow-scrolling: touch;
}

.reader,
.reader * {
    color: #17456e;
}

.reader h2 {
    margin: .08rem 0 .16rem;
    font-size: .32rem;
    line-height: 1.35;
    color: #175488;
}

.reader h3 {
    margin: .2rem 0 .1rem;
    font-size: .26rem;
    color: #175488;
}

.reader p {
    margin: 0 0 .14rem;
    text-indent: 2em;
}

.reader ul,
.reader ol {
    margin: 0 0 .16rem;
    padding-left: 1.35em;
}

.reader li {
    margin: .06rem 0;
}

.reader a {
    color: #2f7ec2;
    text-decoration: underline;
}

.reader img {
    max-width: 90%;
    height: auto;
    border-radius: .12rem;
    margin: .08rem 0;
}

.reader table {
    width: 100%;
    border-collapse: collapse;
    margin: .08rem 0 .16rem;
}

.reader th,
.reader td {
    border: .01rem solid rgba(23, 84, 136, .45);
    padding: .08rem .12rem;
}

.reader::-webkit-scrollbar,
.list::-webkit-scrollbar {
    width: .08rem;
}

.reader::-webkit-scrollbar-thumb,
.list::-webkit-scrollbar-thumb {
    background: rgba(23, 84, 136, .35);
    border-radius: .08rem;
}

.empty {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(23, 84, 136, .85);
    font-size: .3rem;
    letter-spacing: .06em;
}

/* ===== 底部工具栏 ===== */
.dock {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .35rem;
    height: .88rem;
    margin: 0 1.5rem .26rem;
}

.pages {
    margin-right: .12rem;
    display: flex;
    align-items: center;
    gap: .26rem;
}

.page-btn {
    min-width: 2.69rem;
    height: .6rem;
    padding: 0 .3rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: .22rem;
    text-decoration: none;
    border: .01rem solid rgba(255, 255, 255, .9);
    background: #9cc4e6;
    white-space: nowrap;
}

.page-btn.next {
    border-color: transparent;
    background: #2f7ec2;
    box-shadow: 0 .08rem .16rem rgba(30, 88, 152, .28);
}

.page-btn.disabled {
    opacity: 1;
    background: #9cc4e6;
    cursor: default;
}

.page-btn.next.disabled {
    background: #2f7ec2;
}

.page-btn:active {
    transform: translateY(.01rem);
}

.page-index {
    min-width: .8rem;
    text-align: center;
    font-size: .22rem;
    letter-spacing: .03em;
    color: #175488;
}

.tool {
    display: inline-flex;
    align-items: center;
    gap: .12rem;
    color: #17456e;
    text-decoration: none;
    font-size: .26rem;
    font-weight: 600;
    white-space: nowrap;
}

.tool img {
    display: block;
    width: .53rem;
    height: auto;
}

.tool:active {
    transform: translateY(.01rem);
}

/* ===== 提示卡片 ===== */
.install-card {
    width: min(90%, 8.2rem);
    padding: .54rem .6rem;
    text-align: center;
    border-radius: .24rem;
    background: linear-gradient(180deg, #ffffff 0%, #e8f2fc 100%);
    border: .02rem solid rgba(255, 255, 255, .95);
    box-shadow: 0 .12rem .26rem rgba(30, 88, 152, .18);
    color: #175488;
}

.install-card h1 {
    margin: 0 0 .16rem;
    font-size: .42rem;
    font-weight: 700;
}

.install-card p {
    margin: 0;
    font-size: .24rem;
    line-height: 1.7;
}

/* ===== 窄屏适配（不改变 html 基准字号，数值按同一基准换算） ===== */
@media (max-width: 900px) {
    .top {
        height: 2.5rem;
    }

    .top .brand {
        width: 15rem;
        margin-left: .77rem;
        max-height: 82%;
    }

    .home-wrap {
        padding: .26rem .21rem;
        background-size: 170% auto;
    }

    .home-grid {
        --gap-y: .26rem;
        --gap-x: .26rem;
        --card-w: min(45%, 9rem);
    }

    .home-card {
        height: 2.73rem;
        padding: 0 .26rem;
    }

    .home-card .ico-box {
        height: 1.32rem;
        max-height: none;
    }

    .home-card .split {
        height: 1.11rem;
        max-height: none;
        margin: 0 .17rem;
    }

    .home-card strong {
        font-size: .64rem;
    }

    .home-card em {
        font-size: .38rem;
    }

    .workspace {
        flex-direction: column;
        padding: .17rem .21rem .13rem;
    }

    .side {
        width: 100%;
        flex-direction: row;
        justify-content: flex-start;
        gap: .17rem;
        padding: 0 0 .17rem .04rem;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .side::-webkit-scrollbar {
        display: none;
    }

    .side-item,
    .side-item:nth-child(even) {
        flex: none;
        height: .9rem;
        padding: 0 .4rem 0 .95rem;
        border-radius: .26rem;
        transform: none;
    }

    .side-text strong {
        font-size: .3rem;
        letter-spacing: 0;
    }

    .side-text strong::after {
        display: none;
    }

    .side-text em {
        display: none;
    }

    .side-ico {
        left: .04rem;
        height: .6rem;
        border-width: .04rem;
        box-shadow: 0 0 0 .02rem rgba(27, 71, 116, .75), 0 .04rem .13rem rgba(30, 88, 152, .18);
    }

    .panel {
        margin: .26rem 0 0;
    }

    .panel-head {
        min-height: .98rem;
        padding: .17rem .26rem;
    }

    .panel-head span {
        font-size: .51rem;
        letter-spacing: 0;
    }

    .panel-body {
        padding: 0 .26rem;
    }

    .dock {
        height: auto;
        gap: .17rem;
        margin: 0 .21rem .17rem;
        padding-top: .09rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .pages {
        gap: .13rem;
        margin-right: 0;
    }

    .page-btn {
        min-width: 0;
        height: .68rem;
        padding: 0 .26rem;
        font-size: .23rem;
    }

    .page-index {
        min-width: .85rem;
        font-size: .23rem;
    }

    .tool {
        font-size: .26rem;
        gap: .09rem;
    }

    .tool img {
        width: .6rem;
    }
}

@media (max-width: 620px) {
    .home-grid {
        --card-w: min(88%, 13rem);
    }

    .home-card {
        height: 3.72rem;
    }

    .side {
        gap: .19rem;
    }

    .side-item {
        height: 1.05rem;
        padding: 0 .31rem;
        border-radius: .53rem;
    }

    .side-ico {
        display: none;
    }

    .side-text strong {
        font-size: .4rem;
    }
}
