/* ===== 首页 H5 样式：窄屏居中，参考旧版 JSP 的 .app 容器 ===== */

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: calc(100vw / 7.5);
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    background: #e8e8e8;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

img { display: block; max-width: 100%; }
button { border: none; outline: none; background: none; padding: 0; }
a { text-decoration: none; color: inherit; }

.home-page {
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    min-height: 100vh;
    background: #fff;
    position: relative;
    overflow-x: hidden;
}

@media (min-width: 481px) {
    .home-page { box-shadow: 0 0 20px rgba(0, 0, 0, 0.08); }
    html { font-size: calc(480px / 7.5); }
}

.app-header-box {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 480px;
    z-index: 999;
    background: #0350A3;
    display: flex;
    flex-direction: column;
}

.app-header-status-bar { width: 100%; height: env(safe-area-inset-top, 0); }

.app-navbar-box2 {
    height: 0.88rem;
    display: flex;
    align-items: center;
    padding: 0 0.24rem;
    box-sizing: border-box;
    gap: 0.08rem;
}

.app-navbar-box2 .nav-back {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 0.56rem;
    height: 0.56rem;
    flex-shrink: 0;
    color: #fff;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.app-navbar-box2 .nav-back:active {
    opacity: 0.7;
}

.app-navbar-box2 .nav-back-icon {
    width: 0.4rem;
    height: 0.4rem;
}

.app-navbar-title {
    margin: 0;
    font-weight: 500;
    font-size: 0.32rem;
    color: #fff;
    line-height: 0.88rem;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.app-header-placeholder { height: calc(env(safe-area-inset-top, 0px) + 0.88rem); }

.swiper-panel { width: 100%; height: 4.22rem; overflow: hidden; }
.swiper-box, .swiper-slide { width: 100%; height: 4.22rem; }
.swiper-image { width: 100%; height: 100%; object-fit: cover; }

.swiper-mark-panel {
    width: 100%; height: 4.22rem; background: #0350A3; color: #fff;
    display: flex; flex-direction: column; justify-content: space-evenly;
    align-items: center; box-sizing: border-box; padding: 0 0.32rem;
}

.txt-box1 {
    background: rgba(255,255,255,.2); padding: 0 0.24rem; height: 0.56rem;
    border-radius: 0.4rem; display: flex; align-items: center;
    font-size: 0.28rem; letter-spacing: 0.04rem;
}

.txt-box2 { font-weight: 600; font-size: 0.6rem; letter-spacing: 0.1rem; }
.txt-box3 { text-align: center; padding: 0 0.16rem; }
.txt-box3 p { margin: 0; line-height: 0.36rem; font-weight: 500; font-size: 0.28rem; }
.txt-box3 p + p { margin-top: 0.08rem; }

.header-section { padding: 0.24rem; }
.location-bar {
    width: 100%; box-sizing: border-box; padding: 0.24rem; border-radius: 0.24rem;
    background: rgba(0,0,0,.1); display: flex; align-items: flex-start; cursor: pointer;
}
.location-icon2 { flex-shrink: 0; width: 0.48rem; height: 0.48rem; margin-right: 0.08rem; }
.location-icon2 img { width: 100%; height: 100%; }
.location-text {
    flex: 1; min-width: 0; color: #1F2238; font-size: 0.28rem; line-height: 1.45;
    white-space: normal; word-break: break-all; overflow: hidden;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 4;
}
.location-copy-btn {
    flex-shrink: 0; align-self: center; margin-left: 0.16rem; border: none; background: #0350A3; color: #fff;
    font-size: 0.24rem; line-height: 1; padding: 0.12rem 0.2rem; border-radius: 0.16rem;
    cursor: pointer;
}
.location-copy-btn[hidden] { display: none; }
.location-copy-btn:active { opacity: 0.8; }

.sos-section {
    padding: 0.48rem 0.24rem 0.24rem; display: flex; flex-direction: column; align-items: center;
}
.sos-btn {
    width: 2.6rem; height: 2.6rem; border-radius: 50%;
    background: linear-gradient(to bottom right, #FF3B30, #C62828);
    box-shadow: 0 0.08rem 0.32rem rgba(229,57,53,.4);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    animation: pulse-red 1s infinite; cursor: pointer;
}
.sos-img { width: 0.64rem; height: 0.64rem; margin-bottom: 0.08rem; }
.sos-subtext { font-weight: 500; font-size: 0.36rem; color: #fff; letter-spacing: 0.04rem; }
.sos-hint { margin-top: 0.48rem; color: #999; font-size: 0.28rem; }
@keyframes pulse-red {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(229,57,53,.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 0.4rem rgba(229,57,53,0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(229,57,53,0); }
}

.services-section0 { padding: 0.32rem 0.24rem 0.48rem; }
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.32rem; }
.service-item { display: flex; flex-direction: column; align-items: center; cursor: pointer; }
.item-top { display: flex; align-items: center; justify-content: center; margin-bottom: 0.16rem; }
.service-icon { margin-right: 0.04rem; font-size: 0.3rem; }
.service-name { font-size: 0.28rem; font-weight: 600; color: #333; }
.item-img {
    width: 2.1rem; height: 2.1rem; border-radius: 0.16rem; overflow: hidden; position: relative;
    background: #fff; box-shadow: 0 0.06rem 0.12rem rgba(0,0,0,.1);
}
.item-img img { width: 100%; height: 100%; object-fit: cover; }
.img-txt {
    position: absolute; top: 0; left: 0; background: #EA342D; border-radius: 0.16rem 0.08rem 0.08rem 0.08rem;
    padding: 0 0.24rem; height: 0.44rem; line-height: 0.44rem; font-weight: 600; font-size: 0.24rem;
    color: #fff; letter-spacing: 0.02rem;
}

.rescue-times {
    width: calc(100% - 0.48rem); margin: 0 auto 0.24rem; border-radius: 0.24rem;
    background: linear-gradient(to right bottom, #0350A3, rgba(30,80,163,.8), #0350A3);
    color: #fff; box-shadow: 0 0 0.16rem rgba(0,0,0,.05);
}
.rescue-times .txt-box5 {
    width: 95%; padding: 0.24rem 0; display: flex; justify-content: space-around; align-items: center;
    border-top: 1px solid rgba(255,255,255,.25); margin: 0 auto;
}
.box5-item { display: flex; flex-direction: column; align-items: center; }
.box5-item strong { font-weight: 600; font-size: 0.34rem; margin-bottom: 0.08rem; }
.box5-item span { font-size: 0.24rem; }

.rescue-section { background: #f8f9fb; padding: 0.24rem; }
.rescue-section .section-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.24rem; }
.rescue-section .section-title { font-weight: 600; font-size: 0.32rem; color: #333; }
.rescue-list {
    display: flex; gap: 0.32rem; overflow-x: auto; -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.rescue-list::-webkit-scrollbar { display: none; }
.rescue-card {
    flex-shrink: 0; min-width: 4.8rem; background: #fff; padding: 0.32rem; border-radius: 0.32rem;
    box-shadow: 0.04rem 0 0.08rem rgba(0,0,0,.05); border-left: 0.08rem solid transparent;
}
.rescue-accepted { border-left-color: #607D8B; }
.rescue-pending { border-left-color: #9E9E9E; }
.rescue-dispatched { border-left-color: #FF9800; }
.rescue-progress { border-left-color: #2196F3; }
.rescue-completed { border-left-color: #4CAF50; }
.rescue-review { border-left-color: #9C27B0; }
.rescue-reviewed { border-left-color: #009688; }
.rescue-card-header { display: flex; justify-content: space-between; margin-bottom: 0.16rem; }
.plate-number { font-size: 0.28rem; font-weight: bold; color: #333; }
.rescue-status { padding: 0.04rem 0.16rem; font-size: 0.2rem; border-radius: 0.32rem; }
.status-accepted { background: #ECEFF1; color: #546E7A; }
.status-pending { background: #F5F5F5; color: #757575; }
.status-dispatched { background: #FFF3E0; color: #FF9800; }
.status-progress { background: #E3F2FD; color: #2196F3; }
.status-completed { background: #E8F5E9; color: #4CAF50; }
.status-review { background: #F3E5F5; color: #9C27B0; }
.status-reviewed { background: #E0F2F1; color: #009688; }
.rescue-service { display: block; font-size: 0.24rem; color: #666; margin-bottom: 0.16rem; }
.rescue-desc { max-width: 5rem; display: block; font-size: 0.2rem; color: #999; }

.features { background: #f8f9fb; padding: 0.24rem; }
.features .section-header .section-title { font-weight: 600; font-size: 0.32rem; color: #333; }
.features .section-header .section-sub { font-weight: 500; font-size: 0.28rem; color: #333; margin-bottom: 0.24rem; }
.feature-list { display: flex; flex-direction: column; gap: 0.32rem; }
.feature-item { display: flex; align-items: center; gap: 0.24rem; }
.feature-icon {
    width: 0.88rem; height: 0.88rem; border-radius: 0.12rem; flex-shrink: 0;
    background: linear-gradient(135deg, #e8edf2, #dce3ea);
    display: flex; align-items: center; justify-content: center;
}
.feature-icon img { width: 60%; height: 60%; }
.item-title { font-size: 0.28rem; font-weight: 600; color: #222; margin-bottom: 0.04rem; }
.item-sub-title { font-size: 0.24rem; color: #888; line-height: 1.6; }

.guarantee-section {
    margin: 0.24rem; background: #E3F2FD; border-radius: 0.32rem; padding: 0.32rem;
    display: flex; justify-content: space-between; align-items: center;
}
.guarantee-item { display: flex; flex-direction: column; align-items: center; gap: 0.08rem; }
.guarantee-icon { font-size: 0.4rem; color: #1565C0; }
.guarantee-text { font-size: 0.24rem; color: #666; }
.guarantee-divider { width: 0.02rem; height: 0.64rem; background: #90CAF9; }
.bottom-safe-area { height: 2.5rem; }

.bottom-phone-panel {
    position: fixed; left: 50%; transform: translateX(-50%);
    bottom: calc(60px + env(safe-area-inset-bottom, 0px)); z-index: 9;
    width: 100%; max-width: 480px; height: 1.12rem; background: #fff; display: none;
    justify-content: center; align-items: center;
}
.bottom-phone-panel.show { display: flex; }
.bottom-btn-box {
    width: calc(100% - 0.64rem); height: 0.88rem; border-radius: 0.66rem;
    background: linear-gradient(to right, #E85A04, #DD3202);
    display: flex; justify-content: center; align-items: center; cursor: pointer;
    font-weight: 500; font-size: 0.38rem; color: #fff;
}
.bottom-btn-box img { width: 0.48rem; height: 0.48rem; margin-right: 0.12rem; }
.bottom-btn-box .dot { margin: 0 0.12rem; }

.rescue-popup {
    display: none; position: fixed; inset: 0; z-index: 99999;
    background: rgba(0,0,0,.6); justify-content: center; align-items: center;
}
.rescue-popup.show { display: flex; }
.phone-list-wrap {
    width: calc(100% - 0.64rem); max-width: 416px; position: relative;
}
.phone-list-panel {
    background: #fff; border-radius: 0.24rem;
    padding: 0.32rem 0.32rem 0.08rem; max-height: 70vh; overflow-y: auto;
}
.close-icon {
    width: 0.64rem; height: 0.64rem; position: absolute; top: -0.96rem; right: 0.32rem;
    cursor: pointer; z-index: 1;
}
.phone-item {
    display: flex; justify-content: space-between; align-items: flex-end;
    margin-bottom: 0.32rem; cursor: pointer;
}
.phone-left .name { font-weight: 600; font-size: 0.32rem; color: #333; margin-bottom: 0.12rem; }
.phone-left .name .phone-num { margin-left: 0.12rem; font-weight: 400; color: #0350A3; }
.phone-left .area { font-size: 0.26rem; color: #666; }
.phone-right { width: 0.76rem; height: 0.76rem; }
.empty-phone-list {
    width: calc(100% - 0.64rem); max-width: 416px; background: #fff; border-radius: 0.24rem;
    padding: 1rem 0.32rem 0.5rem; display: flex; flex-direction: column; align-items: center;
}
.empty-icon { width: 1.58rem; height: 1.28rem; margin-bottom: 0.24rem; }
.empty-txt { font-weight: 500; font-size: 0.32rem; color: #999; }

.custom-tab-bar {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 0;
    z-index: 99;
    width: 100%;
    max-width: 480px;
    height: 60px;
    background: #fff;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    box-sizing: content-box;
}
.custom-tab-bar .tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    cursor: pointer;
    color: #999;
    flex: 1;
    height: 60px;
    text-decoration: none;
}
.custom-tab-bar .tab-icon {
    width: 22px;
    height: 22px;
    margin-bottom: 0;
}
.custom-tab-bar .tab-text {
    font-size: 11px;
    line-height: 1;
}
.custom-tab-bar .tab-item.active .tab-text { color: #0350A3; font-weight: 700; }
.custom-tab-bar .tab-item.active .tab-icon { color: #0350A3; }
.custom-tab-bar .tab-item:active { opacity: 0.7; }

.page-loading {
    display: none; position: fixed; inset: 0; z-index: 100000;
    background: rgba(0,0,0,.35); justify-content: center; align-items: center;
    color: #fff; font-size: 0.28rem;
}
.page-loading.show { display: flex; }
.page-toast {
    display: none; position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%);
    z-index: 100001; background: rgba(0,0,0,.75); color: #fff; font-size: 0.28rem;
    padding: 0.2rem 0.32rem; border-radius: 0.08rem; max-width: 80vw; text-align: center;
}
.page-toast.show { display: block; }
