:root {
    --brand: #2f6df6;
    --brand-dark: #1f57d6;
    --text: #111827;
    --text-2: #4b5563;
    --text-3: #9ca3af;
    --line: #e5e7eb;
    --bg: #f4f5f7;
    --card: #ffffff;
    --radius: 12px;
    --shadow: 0 2px 10px rgba(15, 23, 42, .05);
}

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

/* hidden 属性必须优先于组件自身的 display:flex，否则弹窗会一直显示 */
[hidden] { display: none !important; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    line-height: 1.6;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; }

.page {
    max-width: 640px;
    margin: 0 auto;
    padding: 0 12px 24px;
    min-height: 100vh;
    background: var(--bg);
}

/* 顶部 */
.site-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 4px 12px;
    color: inherit;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

.site-head--inner {
    padding-top: 10px;
    padding-bottom: 6px;
}

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

.brand__logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    object-fit: cover;
    background: transparent;
    flex: 0 0 auto;
}

.brand__logo--text {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #4f8bff, #2f6df6);
    color: #fff;
    font-size: 18px;
    font-weight: 700;
}

.brand__name {
    font-size: 17px;
    font-weight: 700;
    letter-spacing: .2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.site-head__count {
    font-size: 13px;
    color: var(--text-2);
    background: #fff;
    border: 1px solid var(--line);
    padding: 6px 10px;
    border-radius: 999px;
    white-space: nowrap;
}

.site-head__count strong { color: var(--brand); font-size: 15px; }

/* 轮播 */
.banner {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 12px;
    background: #dfe6f5;
    touch-action: pan-y;
}

.banner__track {
    display: flex;
    transition: transform .35s ease;
    will-change: transform;
}

.banner__item { flex: 0 0 100%; }
.banner__item img { width: 100%; height: auto; aspect-ratio: 750 / 320; object-fit: cover; }

.banner__dots {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 8px;
    display: flex;
    justify-content: center;
    gap: 6px;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .5);
    transition: all .2s;
}

.dot.is-active { background: #fff; width: 14px; border-radius: 4px; }

/* 简介 */
.intro {
    background: var(--card);
    border-radius: var(--radius);
    padding: 12px 14px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
}

.intro__text {
    color: var(--text-2);
    font-size: 13.5px;
    line-height: 1.75;
    word-break: break-word;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

.intro__text.is-open { -webkit-line-clamp: unset; display: block; }

.intro__toggle {
    margin-top: 6px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--brand);
    font-size: 13px;
}

/* 客服 */
.service {
    background: var(--card);
    border-radius: var(--radius);
    padding: 8px 14px 12px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
}

.service__label {
    margin-bottom: 2px;
    color: var(--text);
    font-size: 15px;
    font-weight: 700;
    text-align: center;
}

.service__actions { display: flex; gap: 8px; }
.service__actions .btn {
    flex: 1;
    min-width: 0;
    height: 38px;
    padding: 0 8px;
    font-size: 13px;
}

.recommend__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    padding-right: 0;
}

.recommend__grid--five {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
    padding-right: 0;
}

.recommend__grid--five .recommend__icon {
    width: 40px;
    height: 40px;
}

.recommend__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 0;
    text-decoration: none;
}

.recommend__icon {
    width: 42px;
    height: 42px;
    border: 1px solid #dbe6ff;
    border-radius: 12px;
    background: #eff4ff;
    object-fit: cover;
}

.recommend__icon--text {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand);
    font-size: 16px;
    font-weight: 700;
}

.recommend__name {
    max-width: 100%;
    overflow: hidden;
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 按钮 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 0 18px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    border: 1px solid transparent;
    transition: opacity .15s, transform .05s;
}

.btn:active { transform: scale(.99); opacity: .9; }
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: var(--brand-dark); }
.btn--ghost { background: #eff4ff; color: var(--brand); border-color: #dbe6ff; }
.btn--half { flex: 1; }
.btn--full { width: 100%; flex: 1; }

/* 分类 */
.cats { margin-bottom: 10px; }

.cats__scroll {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 2px 8px;
    scrollbar-width: none;
}

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

.cat-tab {
    flex: 0 0 auto;
    height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text-2);
    font-size: 13.5px;
    transition: all .18s;
}

.cat-tab.is-active {
    background: var(--brand);
    border-color: var(--brand);
    color: #fff;
    font-weight: 600;
}

/* 搜索 */
.search { margin-bottom: 12px; }

.search__box {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0 14px;
    height: 40px;
}

.search__box svg { flex: 0 0 auto; }

.search__box input {
    flex: 1;
    border: 0;
    outline: none;
    background: none;
    font-size: 14px;
    color: var(--text);
    min-width: 0;
}

.search__box input::placeholder { color: var(--text-3); }

.search__clear {
    border: 0;
    background: #f1f2f5;
    color: #6b7280;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    line-height: 1;
    font-size: 15px;
    padding: 0;
}

/* 列表 */
.list { display: flex; flex-direction: column; gap: 10px; }

.job-card {
    display: block;
    background: var(--card);
    border-radius: var(--radius);
    padding: 14px;
    box-shadow: var(--shadow);
    transition: transform .12s;
}

.job-card:active { transform: scale(.995); }

.job-card__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}

.job-card__title-wrap { display: flex; align-items: center; gap: 6px; min-width: 0; }

.job-card__title {
    font-size: 16px;
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.job-card__salary {
    flex: 0 0 auto;
    color: #f04a3a;
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
}

.badge-top {
    flex: 0 0 auto;
    display: inline-block;
    padding: 0 6px;
    height: 18px;
    line-height: 18px;
    font-size: 11px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #ff8a3c, #f04a3a);
    border-radius: 4px;
}

.job-card__company {
    margin-top: 6px;
    color: var(--text-2);
    font-size: 13.5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.job-card__dept { color: var(--text-3); }

.job-card__tags {
    margin-top: 9px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.job-card__tags span {
    padding: 2px 8px;
    background: #f3f4f6;
    border-radius: 4px;
    color: #6b7280;
    font-size: 12px;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 列表状态 */
.list-state {
    margin: 28px 0;
    text-align: center;
    color: var(--text-3);
    font-size: 14px;
}

.list-state .btn { margin-top: 14px; height: 38px; font-size: 14px; }

.list-more {
    text-align: center;
    color: var(--text-3);
    font-size: 13px;
    padding: 18px 0 8px;
}

.list-more.is-end { color: #b0b6c0; }
.list-more:not(.is-end) { cursor: pointer; color: var(--brand); }
.list-more:not(.is-end):active { opacity: .7; }

/* 底部 */
.foot {
    margin-top: 18px;
    text-align: center;
    color: var(--text-3);
    font-size: 12px;
    line-height: 1.8;
}

.foot__name { color: #6b7280; }

/* 详情 */
.page--detail { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
.page--company { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }

.detail-nav {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 48px;
    margin: 0 -12px;
    padding: 0 10px;
    background: rgba(255, 255, 255, .96);
    backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid var(--line);
}

.detail-nav__back {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.detail-nav__title { font-size: 16px; font-weight: 600; }

.detail-nav__share {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    height: 30px;
    padding: 0 15px;
    border: 0;
    border-radius: 999px;
    background: var(--brand);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    box-shadow: 0 4px 12px rgba(47, 109, 246, .28);
}

.detail-nav__share:active { transform: scale(.96); opacity: .92; }

.detail-head {
    margin: 14px 0 12px;
    padding: 2px 2px 0;
}

.detail-head__title-row { display: flex; align-items: center; gap: 8px; }

.detail-head__title { font-size: 21px; line-height: 1.4; word-break: break-word; }

.detail-head__salary {
    margin-top: 8px;
    color: #f04a3a;
    font-size: 19px;
    font-weight: 700;
}

.detail-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 14px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
}

.section-title {
    font-size: 15px;
    margin-bottom: 10px;
    padding-left: 8px;
    border-left: 3px solid var(--brand);
    line-height: 1.2;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px 8px;
}

.info-item { min-width: 0; }
.info-item span { display: block; color: var(--text-3); font-size: 12px; margin-bottom: 2px; }
.info-item b { font-weight: 500; font-size: 13.5px; color: var(--text); word-break: break-word; }

.detail-desc {
    color: #374151;
    font-size: 14px;
    line-height: 1.85;
    word-break: break-word;
}

.company__head { display: flex; align-items: center; gap: 10px; }

.company__logo {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: cover;
    flex: 0 0 auto;
    background: #f3f4f6;
}

.company__logo--text {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef3ff;
    color: var(--brand);
    font-weight: 700;
    font-size: 18px;
}

.company__meta { min-width: 0; }
.company__name { font-size: 15px; font-weight: 600; }
.company__contact { margin-top: 2px; color: var(--text-2); font-size: 13px; }

.company__intro { margin: 10px 0 0; color: var(--text-2); font-size: 13.5px; line-height: 1.8; }

.company__address {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed var(--line);
    font-size: 13px;
    color: var(--text-2);
    display: flex;
    gap: 8px;
}

.company__address span { color: var(--text-3); flex: 0 0 auto; }
.company__address b { font-weight: 500; word-break: break-word; }

.company--link { display: block; color: inherit; text-decoration: none; }
.company__more {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--line);
    color: var(--brand);
    font-size: 13.5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.company__more span { font-size: 16px; }

.company-hero {
    background: var(--card);
    border-radius: var(--radius);
    padding: 16px 14px;
    margin-bottom: 12px;
    box-shadow: var(--shadow);
}
.company__name--hero { font-size: 17px; }
.company-jobs-title {
    font-size: 14px;
    color: var(--text-2);
    margin: 0 2px 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.company-jobs-title em {
    font-style: normal;
    color: var(--brand);
    font-weight: 600;
}
.company-actions { text-align: center; padding: 6px 0 16px; }
.company-actions__back { color: var(--text-3); font-size: 13px; }

.foot--detail { margin-bottom: 4px; }

.action-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    display: flex;
    gap: 10px;
    max-width: 640px;
    margin: 0 auto;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, .97);
    border-top: 1px solid var(--line);
}

/* 底部操作栏按钮等分整行，避免按内容宽度缩成一团 */
.action-bar > .btn { flex: 1 1 0; min-width: 0; width: auto; }

.action-bar__none {
    flex: 1;
    text-align: center;
    color: var(--text-3);
    font-size: 14px;
    padding: 10px 0;
}

/* 404 */
.page--nofound {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 24px;
}

.nofound { text-align: center; max-width: 320px; }

.nofound__icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: #fef2f2;
    color: #ef4444;
    font-size: 30px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nofound__title { font-size: 17px; font-weight: 600; margin: 0 0 6px; }
.nofound__hint { color: var(--text-3); font-size: 13.5px; margin: 0 0 20px; }

/* 复制弹窗 */
.copy-modal { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; }

.copy-modal__mask { position: absolute; inset: 0; background: rgba(17, 24, 39, .45); }

.copy-modal__box {
    position: relative;
    width: min(300px, 84vw);
    background: #fff;
    border-radius: 14px;
    padding: 20px 18px 16px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, .18);
}

.copy-modal__box h4 { font-size: 16px; margin-bottom: 12px; }

.copy-modal__value {
    padding: 10px 12px;
    background: #f3f4f6;
    border-radius: 8px;
    font-size: 15px;
    word-break: break-all;
    user-select: all;
    margin-bottom: 14px;
    color: #111827;
}

.share-modal__desc {
    margin: -4px 0 14px;
    color: #6b7280;
    font-size: 13px;
    line-height: 1.6;
}

.share-modal__cancel {
    width: 100%;
    height: 36px;
    margin-top: 8px;
    border: 0;
    background: transparent;
    color: #6b7280;
    font-size: 14px;
}

.share-modal__cancel:active { opacity: .7; }

/* 轻提示 */
.toast {
    position: fixed;
    left: 50%;
    bottom: 90px;
    transform: translateX(-50%);
    z-index: 80;
    max-width: 76vw;
    padding: 10px 16px;
    background: rgba(17, 24, 39, .88);
    color: #fff;
    font-size: 13.5px;
    border-radius: 20px;
    text-align: center;
}

/* 右侧悬浮工具：客服 + 返回顶部 */
.side-tools {
    position: fixed;
    right: 12px;
    bottom: calc(88px + env(safe-area-inset-bottom));
    z-index: 55;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
}

.side-service { position: relative; }

.side-fab {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #fff;
    color: var(--text-2);
    box-shadow: 0 6px 20px rgba(15, 23, 42, .16);
    transition: transform .15s ease, box-shadow .15s ease;
}

.side-fab:active { transform: scale(.95); }

.side-fab--service {
    flex-direction: column;
    background: linear-gradient(145deg, #3b82f6, var(--brand-dark));
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 1px;
    box-shadow: 0 8px 24px rgba(47, 109, 246, .35);
}

.side-service.is-open .side-fab--service {
    box-shadow: 0 8px 28px rgba(47, 109, 246, .5);
}

.side-fab--service span { transform: translateX(1px); }

.side-fab--top {
    flex-direction: column;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, .96);
}

.side-fab__arrow { font-size: 18px; line-height: 1; color: var(--text-2); }
.side-fab__label { margin-top: 2px; font-size: 10px; line-height: 1; color: var(--text-3); }

.service-panel {
    position: absolute;
    right: calc(100% + 10px);
    bottom: 0;
    z-index: 1;
    width: min(224px, calc(100vw - 86px));
    max-height: calc(100vh - 140px);
    overflow-y: auto;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 18px 44px rgba(15, 23, 42, .18);
    text-align: center;
}

.service-panel__head {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    color: var(--text);
    font-size: 15px;
    font-weight: 700;
}

.service-panel__title { text-align: center; font-weight: 700; }

.service-panel__close {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f3f4f6;
    color: var(--text-2);
    font-size: 18px;
    line-height: 1;
}

.service-panel__qr {
    width: 100%;
    max-width: 148px;
    height: auto;
    margin: 0 auto 6px;
    border-radius: 10px;
    background: #fff;
}

.service-panel__qr--empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 148px;
    border: 1px dashed var(--line);
    background: #fafbfc;
    color: var(--text-3);
    font-size: 13px;
}

.service-panel__tip { margin-bottom: 10px; color: var(--text-3); font-size: 12px; }

.service-panel__empty {
    padding: 36px 0;
    color: var(--text-3);
    font-size: 13px;
}

.service-panel__empty--small { padding: 4px 0 2px; font-size: 12px; }

.service-panel__id {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    padding: 8px 10px;
    border-radius: 9px;
    background: #f8fafc;
    color: var(--text-2);
    font-size: 12px;
}

.service-panel__id b { color: var(--text); font-size: 13px; word-break: break-all; }

.service-panel__actions {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.service-panel__actions > .service-panel__copy,
.service-panel__actions > .service-panel__message {
    flex: 1;
    width: auto;
    margin-top: 0;
}

.service-panel__copy,
.service-panel__message,
.service-panel__phone {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    border-radius: 9px;
    font-size: 13px;
    white-space: nowrap;
}

.service-panel__copy { border: 0; background: #eaf1ff; color: var(--brand-dark); font-weight: 600; }
.service-panel__message { border: 1px solid #dbe3f0; background: #fff; color: var(--text); font-weight: 600; }
.service-panel__phone {
    width: 100%;
    margin-top: 8px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text-2);
    font-weight: 500;
}

.message-modal {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.message-modal[hidden] { display: none; }

.message-modal__mask {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .55);
}

.message-modal__box {
    position: relative;
    width: 100%;
    max-width: 420px;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    padding: 22px 20px 20px;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
}

.message-modal__close {
    position: absolute;
    right: 12px;
    top: 12px;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f3f4f6;
    color: var(--text-2);
    font-size: 19px;
    line-height: 1;
}

.message-modal__title {
    margin: 0 0 18px;
    color: var(--text);
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    text-align: left;
}

.message-field { margin-bottom: 14px; }

.message-field label {
    display: block;
    margin-bottom: 6px;
    color: var(--text);
    font-size: 13px;
    font-weight: 600;
}

.message-field input,
.message-field textarea {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid #dfe5ee;
    border-radius: 10px;
    background: #fff;
    color: var(--text);
    font-size: 13px;
    line-height: 1.5;
    outline: none;
}

.message-field input:focus,
.message-field textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(47, 109, 246, .1);
}

.message-field textarea {
    min-height: 118px;
    resize: vertical;
}

.message-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 46px;
    border: 1px solid #dbe6ff;
    border-radius: 10px;
    background: #eff4ff;
    color: var(--brand);
    font-size: 15px;
    font-weight: 600;
}

.message-submit:active { transform: scale(.99); }
.message-submit:disabled { opacity: .65; }

.message-form__tip {
    min-height: 18px;
    margin: 2px 0 8px;
    color: var(--text-3);
    font-size: 12.5px;
    text-align: center;
}

.message-form__tip.is-ok { color: #047857; }
.message-form__tip.is-error { color: #b91c1c; }

body.is-message-open { overflow: hidden; }

@media (max-width: 340px) {
    .side-tools { right: 8px; }
    .service-panel { width: calc(100vw - 76px); padding: 12px; }
    .message-modal { padding: 10px; }
    .message-modal__box { padding: 20px 16px 16px; border-radius: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    .side-fab { transition: none; }
}
