/* ==========================================================================
   安静家官网 · H5 移动端样式（APP 壳：固定渐变标题栏 + 固定底部 5 Tab）
   ========================================================================== */

body.is-mobile {
    background: #e9ecf0;
}

.aj-app {
    position: relative;
    width: 100%;
    max-width: 640px;
    min-height: 100vh;
    margin: 0 auto;
    background: var(--bg);
    overflow-x: hidden;
}

/* 顶部标题栏 ------------------------------------------------------------ */
.aj-header {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 80;
    width: 100%;
    max-width: 640px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-grad);
    color: #fff;
    box-shadow: 0 2px 12px rgba(226, 61, 14, 0.24);
}

.aj-header .title {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 1px;
    max-width: 62%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.aj-header .side {
    position: absolute;
    top: 0;
    height: 48px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.92);
}

.aj-header .side.left { left: 0; }
.aj-header .side.right { right: 0; }

/* 内容区（独立滚动，底部给 Tab 与安全区留白） --------------------------- */
.aj-body {
    padding-top: 48px;
    padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px));
}

/* 底部 5 Tab ------------------------------------------------------------ */
.aj-tabbar {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    z-index: 90;
    width: 100%;
    max-width: 640px;
    display: flex;
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    backdrop-filter: blur(10px);
}

.aj-tabbar a {
    flex: 1;
    padding: 7px 0 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    font-size: 11px;
    color: var(--text-3);
    transition: color 0.2s;
}

.aj-tabbar a svg {
    width: 22px;
    height: 22px;
}

.aj-tabbar a.is-active {
    color: var(--brand);
    font-weight: 600;
}

/* 首页大图轮播 ---------------------------------------------------------- */
.aj-hero {
    position: relative;
    height: 236px;
    overflow: hidden;
    border-radius: 0 0 20px 20px;
    background: var(--brand-grad);
}

.aj-hero-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.7s ease;
    background-size: cover;
    background-position: center;
}

.aj-hero-slide.is-show {
    opacity: 1;
}

.aj-hero-slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(20, 8, 0, 0.18) 0%, rgba(20, 8, 0, 0.62) 100%);
}

.aj-hero-caption {
    position: absolute;
    z-index: 2;
    left: 18px;
    right: 18px;
    bottom: 34px;
    color: #fff;
}

.aj-hero-caption h1 {
    font-size: 24px;
    line-height: 1.35;
    font-weight: 700;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.28);
}

.aj-hero-caption p {
    margin-top: 8px;
    font-size: 13px;
    opacity: 0.9;
    line-height: 1.7;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.aj-hero-dots {
    position: absolute;
    z-index: 3;
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
}

.aj-hero-dots span {
    width: 14px;
    height: 3px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.5);
}

.aj-hero-dots span.is-show {
    background: #fff;
    width: 22px;
}

/* 快捷入口宫格 ---------------------------------------------------------- */
.aj-quick {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    margin: -18px 12px 0;
    padding: 16px 6px;
    position: relative;
    z-index: 5;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 22px rgba(31, 35, 41, 0.07);
}

.aj-quick a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text);
}

.aj-quick .ico {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: var(--brand-soft);
    color: var(--brand);
    display: flex;
    align-items: center;
    justify-content: center;
}

.aj-quick .ico svg {
    width: 22px;
    height: 22px;
}

/* 卡片与分区 ------------------------------------------------------------ */
.aj-card {
    background: #fff;
    border-radius: 14px;
    margin: 12px;
    padding: 16px;
}

.aj-sec-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 22px 16px 12px;
}

.aj-sec-head h2 {
    font-size: 17px;
    font-weight: 700;
    padding-left: 10px;
    border-left: 4px solid var(--brand);
    line-height: 1.1;
}

.aj-sec-head .more {
    font-size: 13px;
    color: var(--text-3);
    display: flex;
    align-items: center;
    gap: 2px;
}

/* 数据概览 -------------------------------------------------------------- */
.aj-stats {
    display: flex;
    margin: 12px;
    background: #fff;
    border-radius: 14px;
    padding: 16px 0;
}

.aj-stats .item {
    flex: 1;
    text-align: center;
}

.aj-stats .item + .item {
    border-left: 1px solid var(--line);
}

.aj-stats .num {
    font-size: 22px;
    font-weight: 700;
    color: var(--brand-deep);
}

.aj-stats .label {
    font-size: 12px;
    color: var(--text-2);
    margin-top: 2px;
}

/* 门店卡片 -------------------------------------------------------------- */
.aj-store-card {
    display: flex;
    gap: 12px;
    background: #fff;
    border-radius: 14px;
    padding: 14px;
    margin: 0 12px 12px;
}

.aj-store-card .pic {
    width: 84px;
    height: 84px;
    flex: 0 0 84px;
    border-radius: 12px;
    background: linear-gradient(135deg, #ffe6d8, #ffd0b8);
    background-size: cover;
    background-position: center;
}

.aj-store-card .info {
    flex: 1;
    min-width: 0;
}

.aj-store-card h3 {
    font-size: 15.5px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.aj-store-card h3 .city {
    font-size: 11px;
    font-weight: 400;
    color: var(--brand);
    background: var(--brand-soft);
    border-radius: 4px;
    padding: 1px 6px;
    flex: 0 0 auto;
}

.aj-store-card .line {
    font-size: 12.5px;
    color: var(--text-2);
    margin-top: 5px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.aj-store-card .ops {
    margin-top: 8px;
    display: flex;
    gap: 8px;
}

.aj-chip-btn {
    font-size: 12px;
    border-radius: 999px;
    padding: 4px 12px;
    border: 1px solid rgba(255, 90, 31, 0.35);
    color: var(--brand);
    background: #fff;
}

.aj-chip-btn.is-fill {
    background: var(--brand-grad);
    border-color: transparent;
    color: #fff;
}

/* 岗位卡片 -------------------------------------------------------------- */
.aj-job-card {
    display: block;
    background: #fff;
    border-radius: 14px;
    padding: 15px 16px;
    margin: 0 12px 12px;
}

.aj-job-card .top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.aj-job-card .t {
    font-size: 16px;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.aj-job-card .salary {
    font-size: 15px;
    font-weight: 700;
    color: var(--brand-deep);
    flex: 0 0 auto;
}

.aj-job-card .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.aj-tag {
    font-size: 11.5px;
    color: var(--text-2);
    background: var(--bg);
    border-radius: 5px;
    padding: 2px 8px;
}

.aj-tag.is-brand {
    color: var(--brand-deep);
    background: var(--brand-soft);
}

/* 分段切换 -------------------------------------------------------------- */
.aj-seg {
    display: flex;
    gap: 8px;
    padding: 12px 12px 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.aj-seg::-webkit-scrollbar {
    display: none;
}

.aj-seg a {
    flex: 0 0 auto;
    padding: 7px 18px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--line);
    font-size: 13.5px;
    color: var(--text-2);
}

.aj-seg a.is-active {
    background: var(--brand-grad);
    border-color: transparent;
    color: #fff;
    font-weight: 600;
}

/* 地图 + 底部抽屉（门店页） -------------------------------------------- */
.aj-map-wrap {
    position: relative;
    height: calc(100vh - 48px - 64px);
    /* 抽屉高度，页面脚本实时调整；地图整块跟着它一起上移 */
    --sheet-h: 40%;
    overflow: hidden;
}

.aj-map {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    /* 可见高度 = 容器高度，抽屉越高地图越矮（地图自己会重算渲染尺寸） */
    bottom: var(--sheet-h);
    background: #eceff3;
    transition: bottom 0.28s ease;
    /* 必须有层级：腾讯地图内部会塞一个 z-index:1000 的覆盖层，
       这里给地图一个明确的 stacking context，把它的 z-index 关在自己里面，
       否则那个覆盖层会跑到抽屉上面，把把手和卡片按钮全挡住 */
    z-index: 1;
}

.aj-map .placeholder {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 24px;
    font-size: 13px;
    color: var(--text-3);
}

.aj-sheet {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: var(--sheet-h);
    z-index: 2;
    background: var(--bg);
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.12);
    display: flex;
    flex-direction: column;
    transition: height 0.28s ease;
    overflow: hidden;
}

/* 拖拽过程去掉过渡，抽屉与地图实时跟手 */
.aj-map-wrap.is-dragging .aj-map,
.aj-map-wrap.is-dragging .aj-sheet {
    transition: none;
}

.aj-sheet-handle {
    padding: 8px 0 4px;
    display: flex;
    justify-content: center;
    cursor: pointer;
    flex: 0 0 auto;
    touch-action: none;
}

.aj-sheet-handle i {
    width: 40px;
    height: 4px;
    border-radius: 2px;
    background: #d3d7dd;
    display: block;
}

.aj-sheet-head {
    padding: 4px 16px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 0 0 auto;
    cursor: grab;
    touch-action: none;
}

.aj-sheet-head h3 {
    font-size: 15px;
    font-weight: 700;
}

.aj-sheet-head span {
    font-size: 12px;
    color: var(--text-3);
}

.aj-sheet-body {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 20px;
}

.aj-sheet .aj-store-card {
    background: #fff;
    margin-bottom: 10px;
}

/* 悬浮操作按钮 ---------------------------------------------------------- */
.aj-fab {
    position: fixed;
    right: 16px;
    bottom: calc(78px + env(safe-area-inset-bottom, 0px));
    z-index: 70;
    height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    background: var(--brand-grad);
    color: #fff;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 10px 24px rgba(240, 68, 15, 0.32);
}

/* 详情页标题卡 ---------------------------------------------------------- */
.aj-detail-head {
    background: #fff;
    padding: 18px 16px;
    border-radius: 0 0 18px 18px;
}

.aj-detail-head h1 {
    font-size: 21px;
    line-height: 1.4;
}

.aj-detail-head .salary {
    margin-top: 8px;
    font-size: 22px;
    font-weight: 700;
    color: var(--brand-deep);
}

.aj-detail-head .tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

/* 富文本在手机端的适配 -------------------------------------------------- */
.aj-rich-sm {
    font-size: 15px;
    line-height: 1.85;
}

.aj-rich-sm img {
    border-radius: 10px;
}

/* 底部安全留白（表单页提交按钮不被 Tab 遮住） -------------------------- */
.aj-pad-bottom {
    height: 28px;
}
