.jlzy-qq,
.jlzy-qq * { box-sizing: border-box; }

.jlzy-qq {
    --jlzy-qq-accent: #1677ff;
    --jlzy-qq-y: 50%;
    position: fixed;
    z-index: 870;
    top: var(--jlzy-qq-y);
    left: clamp(12px, 1.5vw, 24px);
    color: #10233f;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    line-height: 1.5;
    transform: translateY(-50%);
}

.jlzy-qq button,
.jlzy-qq a { font: inherit; }

.jlzy-qq__trigger {
    position: relative;
    width: 54px;
    min-height: 146px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 15px 8px;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(155deg, color-mix(in srgb, var(--jlzy-qq-accent), #fff 12%), var(--jlzy-qq-accent) 52%, #063b82 125%);
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 18px;
    box-shadow: 0 16px 38px rgba(5,42,91,.24), inset 0 1px 0 rgba(255,255,255,.22);
    transition: transform .25s ease, box-shadow .25s ease, filter .25s ease;
}

.jlzy-qq__trigger:hover,
.jlzy-qq__trigger:focus-visible,
.jlzy-qq.is-open .jlzy-qq__trigger {
    filter: saturate(1.08);
    transform: translateX(3px);
    box-shadow: 0 20px 46px rgba(5,42,91,.3), inset 0 1px 0 rgba(255,255,255,.24);
}

.jlzy-qq__trigger:focus-visible,
.jlzy-qq__close:focus-visible,
.jlzy-qq__number button:focus-visible,
.jlzy-qq__action:focus-visible { outline: 3px solid rgba(22,119,255,.3); outline-offset: 3px; }

.jlzy-qq__trigger-icon {
    width: 31px;
    height: 31px;
    display: grid;
    place-items: center;
    background: rgba(255,255,255,.16);
    border: 1px solid rgba(255,255,255,.22);
    border-radius: 10px;
}

.jlzy-qq__trigger-icon svg,
.jlzy-qq__action svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.jlzy-qq__trigger-text { width: 1em; font-size: 14px; font-weight: 800; line-height: 1.25; letter-spacing: .08em; }
.jlzy-qq__pulse { position: absolute; top: 10px; right: 9px; width: 9px; height: 9px; background: #37d884; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 0 0 0 rgba(55,216,132,.45); animation: jlzy-qq-pulse 2.1s infinite; }

.jlzy-qq__panel {
    position: absolute;
    top: 50%;
    left: calc(100% + 14px);
    width: 286px;
    max-height: calc(100vh - 24px);
    overflow-x: hidden;
    overflow-y: auto;
    visibility: hidden;
    pointer-events: none;
    opacity: 0;
    background: rgba(255,255,255,.98);
    border: 1px solid rgba(15,56,106,.1);
    border-radius: 20px;
    box-shadow: 0 24px 70px rgba(5,37,78,.2);
    transform: translate(-10px,-50%) scale(.97);
    transform-origin: left center;
    transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
}

.jlzy-qq.is-open .jlzy-qq__panel { visibility: visible; pointer-events: auto; opacity: 1; transform: translate(0,-50%) scale(1); }

.jlzy-qq__header {
    min-height: 88px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px;
    color: #fff;
    background: radial-gradient(circle at 90% 0, rgba(255,255,255,.2), transparent 42%), linear-gradient(135deg, #063b82, var(--jlzy-qq-accent));
}

.jlzy-qq__avatar { width: 47px; height: 47px; flex: 0 0 47px; display: grid; place-items: center; font-size: 13px; font-weight: 900; letter-spacing: -.04em; color: var(--jlzy-qq-accent); background: #fff; border: 3px solid rgba(255,255,255,.3); border-radius: 16px; box-shadow: 0 8px 20px rgba(0,0,0,.12); }
.jlzy-qq__identity { min-width: 0; display: flex; flex: 1; flex-direction: column; }
.jlzy-qq__identity strong { overflow: hidden; font-size: 16px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.jlzy-qq__identity small { display: flex; align-items: center; gap: 6px; margin-top: 2px; color: rgba(255,255,255,.82); font-size: 12px; }
.jlzy-qq__identity i { width: 7px; height: 7px; background: #4fe39a; border-radius: 50%; box-shadow: 0 0 0 3px rgba(79,227,154,.17); }
.jlzy-qq__close { width: 32px; height: 32px; display: grid; flex: 0 0 32px; padding: 0; place-items: center; cursor: pointer; color: #fff; background: rgba(255,255,255,.12); border: 0; border-radius: 10px; transition: background .2s ease, transform .2s ease; }
.jlzy-qq__close:hover { background: rgba(255,255,255,.24); transform: rotate(5deg); }
.jlzy-qq__close svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

.jlzy-qq__body { padding: 18px; }
.jlzy-qq__greeting { position: relative; margin: 0 0 15px; padding: 12px 14px; color: #41536d; background: #f3f7fc; border: 1px solid #e7eef7; border-radius: 6px 14px 14px; font-size: 13px; line-height: 1.7; }
.jlzy-qq__action { min-height: 47px; display: flex; align-items: center; gap: 9px; padding: 0 14px; color: #fff; text-decoration: none; background: linear-gradient(120deg, var(--jlzy-qq-accent), #0754b5); border-radius: 13px; box-shadow: 0 10px 24px color-mix(in srgb, var(--jlzy-qq-accent), transparent 72%); transition: transform .2s ease, box-shadow .2s ease; }
.jlzy-qq__action:hover { color: #fff; text-decoration: none; transform: translateY(-2px); box-shadow: 0 14px 28px color-mix(in srgb, var(--jlzy-qq-accent), transparent 65%); }
.jlzy-qq__action svg { width: 20px; height: 20px; }
.jlzy-qq__action span { flex: 1; font-size: 14px; font-weight: 800; }
.jlzy-qq__action b { font-size: 18px; font-weight: 400; transition: transform .2s ease; }
.jlzy-qq__action:hover b { transform: translateX(3px); }
.jlzy-qq__number { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 13px; padding: 10px 2px 0; color: #66758b; font-size: 12px; }
.jlzy-qq__number strong { color: #17345b; font-size: 13px; }
.jlzy-qq__number button { padding: 5px 8px; cursor: pointer; color: var(--jlzy-qq-accent); background: color-mix(in srgb, var(--jlzy-qq-accent), #fff 92%); border: 1px solid color-mix(in srgb, var(--jlzy-qq-accent), #fff 78%); border-radius: 8px; font-size: 11px; font-weight: 700; }
.jlzy-qq__hours { display: flex; align-items: center; gap: 7px; margin: 11px 0 0; color: #8591a2; font-size: 11px; }
.jlzy-qq__hours svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.jlzy-qq__qr { display: flex; flex-direction: column; align-items: center; gap: 7px; margin-top: 15px; padding-top: 15px; color: #7c899b; border-top: 1px solid #edf1f6; font-size: 11px; }
.jlzy-qq__qr img { width: 132px; height: 132px; display: block; padding: 5px; object-fit: contain; background: #fff; border: 1px solid #e7edf4; border-radius: 12px; }
.jlzy-qq__notice { min-height: 0; margin: 0; color: #20a765; font-size: 11px; text-align: right; }
.jlzy-qq__notice:not(:empty) { min-height: 17px; margin-top: 7px; }

@keyframes jlzy-qq-pulse { 0% { box-shadow: 0 0 0 0 rgba(55,216,132,.45); } 70% { box-shadow: 0 0 0 8px rgba(55,216,132,0); } 100% { box-shadow: 0 0 0 0 rgba(55,216,132,0); } }

@media (max-width: 767px) {
    .jlzy-qq[data-mobile="hide"] { display: none; }
    .jlzy-qq[data-mobile="compact"] { top: auto; bottom: calc(80px + env(safe-area-inset-bottom)); left: 12px; z-index: 890; transform: none; }
    .jlzy-qq[data-mobile="compact"] .jlzy-qq__trigger { width: 48px; min-height: 48px; padding: 0; border-radius: 50%; }
    .jlzy-qq[data-mobile="compact"] .jlzy-qq__trigger-icon { width: 30px; height: 30px; background: transparent; border: 0; }
    .jlzy-qq[data-mobile="compact"] .jlzy-qq__trigger-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .jlzy-qq[data-mobile="compact"] .jlzy-qq__pulse { top: 2px; right: 2px; }
    .jlzy-qq[data-mobile="compact"] .jlzy-qq__panel { top: auto; bottom: 0; left: calc(100% + 10px); width: min(286px, calc(100vw - 82px)); max-height: calc(100vh - 96px - env(safe-area-inset-bottom)); overflow-y: auto; transform: translate(-8px,0) scale(.97); transform-origin: left bottom; }
    .jlzy-qq[data-mobile="compact"].is-open .jlzy-qq__panel { transform: translate(0,0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .jlzy-qq *, .jlzy-qq *::before, .jlzy-qq *::after { scroll-behavior: auto !important; animation: none !important; transition-duration: .01ms !important; }
}

@supports not (color: color-mix(in srgb, #000, #fff)) {
    .jlzy-qq__trigger { background: linear-gradient(155deg, #2288ff, var(--jlzy-qq-accent) 52%, #063b82); }
    .jlzy-qq__action { box-shadow: 0 10px 24px rgba(6,59,130,.2); }
    .jlzy-qq__number button { background: #f1f7ff; border-color: #d7e7fb; }
}
