/* ============================================================
   眸耕知识库智能客服 · 前台首页
   现代卡片式布局：智能硬件 / 公开知识库 / AI 问答 / 个人中心
   作者：阳润科技
   ============================================================ */

:root {
    --ink: #16241b;
    --ink-soft: #34483b;
    --muted: #63756a;
    --line: #dbe5dc;
    --line-strong: #c5d5c9;
    --paper: #f2f6f0;
    --card: #ffffff;
    --green: #1e5b3d;
    --green-deep: #123a28;
    --green-soft: #e7f0e9;
    --sand: #d8a33c;
    --sand-soft: #f8efd8;
    --danger: #a83b32;
    --shadow: 0 16px 40px rgba(20, 51, 35, .08);
    --radius: 22px;
    --font: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Source Han Sans SC", sans-serif;
}

* { box-sizing: border-box; }

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    min-width: 320px;
    color: var(--ink);
    background:
        radial-gradient(900px 520px at 88% -8%, #e6efe4 0%, rgba(230, 239, 228, 0) 70%),
        linear-gradient(180deg, #f6f9f4 0%, var(--paper) 32%, #f0f5ef 100%);
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

:focus-visible {
    outline: 3px solid rgba(216, 163, 60, .75);
    outline-offset: 3px;
}

.skip-link {
    position: fixed;
    left: 12px;
    top: -60px;
    z-index: 200;
    padding: 10px 16px;
    border-radius: 0 0 12px 12px;
    background: var(--green-deep);
    color: #fff;
    transition: top .2s ease;
}
.skip-link:focus { top: 0; }

.site-shell {
    width: min(1180px, calc(100% - 48px));
    margin: 0 auto;
}

/* ---------- 顶部 ---------- */
.site-head {
    position: sticky;
    top: 0;
    z-index: 60;
    display: flex;
    align-items: center;
    gap: 22px;
    margin: 14px 0 0;
    padding: 12px 16px;
    border: 1px solid rgba(219, 229, 220, .9);
    border-radius: 18px;
    background: rgba(255, 255, 255, .88);
    box-shadow: 0 8px 26px rgba(20, 51, 35, .06);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}

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

.site-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 13px;
    background: var(--green-deep);
    color: #f4e9cd;
    font-size: 21px;
    font-weight: 700;
    letter-spacing: .04em;
    line-height: 1;
    white-space: nowrap;
    flex: 0 0 auto;
    box-shadow: inset 0 -8px 16px rgba(0, 0, 0, .18);
}
.site-mark--double { font-size: 15px; letter-spacing: .02em; }

.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 15px; letter-spacing: .01em; }
.brand-text small { margin-top: 3px; color: var(--muted); font-size: 11px; letter-spacing: .02em; }

.site-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: 10px;
}

.site-nav a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 10px;
    color: var(--ink-soft);
    font-size: 13px;
    white-space: nowrap;
}
.site-nav a:hover { background: var(--green-soft); color: var(--green-deep); }

.site-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
}

.online-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 30px;
    padding: 0 10px;
    border: 1px solid #cfe2d5;
    border-radius: 999px;
    background: #f2f9f3;
    color: #245d3f;
    font-size: 11px;
    white-space: nowrap;
}

.online-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #36a35f;
    box-shadow: 0 0 0 4px rgba(54, 163, 95, .13);
    flex: 0 0 auto;
}

.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fff;
    color: var(--ink-soft);
    font-size: 13px;
    transition: border-color .2s, background .2s, color .2s;
}
.ghost-btn:hover { border-color: var(--line-strong); background: #f8fbf7; }
.ghost-btn.primary-ghost { border-color: var(--green); background: var(--green); color: #fff; }
.ghost-btn.primary-ghost:hover { background: var(--green-deep); }
.ghost-btn.small { min-height: 32px; padding: 0 11px; font-size: 12px; }

/* ---------- Hero ---------- */
.hero-section {
    display: grid;
    grid-template-columns: 1.04fr .96fr;
    align-items: center;
    gap: clamp(28px, 5vw, 70px);
    padding: clamp(36px, 5.5vw, 68px) 8px clamp(22px, 3.2vw, 34px);
    scroll-margin-top: 96px;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    color: var(--green);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .08em;
}
.eyebrow::before {
    content: "";
    width: 22px;
    height: 2px;
    background: var(--sand);
    border-radius: 2px;
}

.hero-copy h1 {
    margin: 0 0 18px;
    max-width: 11em;
    font-size: clamp(42px, 5.2vw, 62px);
    line-height: 1.12;
    letter-spacing: -.035em;
    font-weight: 800;
    color: var(--green-deep);
    text-wrap: balance;
}

.hero-desc {
    margin: 0;
    max-width: 34em;
    color: var(--ink-soft);
    font-size: 15px;
    line-height: 1.85;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 26px 0 20px;
}

.btn-main,
.btn-soft {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    transition: transform .2s, box-shadow .2s, background .2s;
}
.btn-main {
    background: var(--green-deep);
    color: #fff;
    box-shadow: 0 12px 24px rgba(18, 58, 40, .18);
}
.btn-main:hover { transform: translateY(-1px); box-shadow: 0 16px 28px rgba(18, 58, 40, .22); }
.btn-soft {
    border: 1px solid var(--line-strong);
    background: #fff;
    color: var(--green-deep);
}
.btn-soft:hover { background: var(--green-soft); }
.btn-soft.full { width: 100%; }

.hero-asks {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.hero-asks button {
    min-height: 38px;
    padding: 0 13px;
    border: 1px dashed #c9d9cb;
    border-radius: 999px;
    background: rgba(255, 255, 255, .7);
    color: var(--ink-soft);
    font-size: 12px;
    text-align: left;
    transition: border-color .2s, background .2s, color .2s;
}
.hero-asks button:hover { border-color: var(--green); background: var(--green-soft); color: var(--green-deep); }

.hero-visual {
    position: relative;
    margin: 0;
    border-radius: 28px;
    overflow: hidden;
    border: 1px solid #dfe9df;
    box-shadow: var(--shadow);
    background: #dfe9df;
    isolation: isolate;
    aspect-ratio: 4 / 3;
}
.hero-visual::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(9, 24, 16, 0) 46%, rgba(9, 24, 16, .72) 100%);
    z-index: 1;
    pointer-events: none;
}
.hero-visual img {
    width: 100%;
    height: 100%;
    aspect-ratio: auto;
    object-fit: cover;
    object-position: center 58%;
}
.hero-visual figcaption {
    position: absolute;
    left: 22px;
    right: 22px;
    bottom: 20px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 3px;
    color: #fff;
}
.visual-kicker { color: #f1d9a8; font-size: 11px; letter-spacing: .12em; }
.hero-visual figcaption span:last-child { font-size: 16px; font-weight: 600; }

.hero-float {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 13px;
    border: 1px solid rgba(255, 255, 255, .45);
    border-radius: 14px;
    background: rgba(255, 255, 255, .92);
    color: var(--ink);
    box-shadow: 0 10px 26px rgba(13, 36, 24, .16);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}
.hero-float strong { display: block; font-size: 12px; line-height: 1.3; }
.hero-float small { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; }
.float-dot {
    width: 9px; height: 9px; border-radius: 50%;
    background: #36a35f;
    box-shadow: 0 0 0 5px rgba(54, 163, 95, .15);
}

/* ---------- 数据条 ---------- */
.stat-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    margin: 0 8px clamp(12px, 1.4vw, 16px);
    border: 1px solid var(--line);
    border-radius: 18px;
    background: rgba(255, 255, 255, .82);
    overflow: hidden;
}
.stat-strip > div {
    padding: 18px 22px;
    border-right: 1px solid #e8eee8;
}
.stat-strip > div:last-child { border-right: 0; }
.stat-strip strong {
    display: block;
    color: var(--green-deep);
    font-size: 26px;
    line-height: 1.2;
    letter-spacing: -.02em;
}
.stat-strip span { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }

/* ---------- 区块 ---------- */
.section-block {
    padding: clamp(14px, 2vw, 22px) 8px clamp(20px, 2.6vw, 28px);
    scroll-margin-top: 92px;
}

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 16px;
}
.section-head .eyebrow { margin-bottom: 9px; }
.section-head h2 {
    margin: 0;
    max-width: 22em;
    font-size: clamp(27px, 3.2vw, 38px);
    line-height: 1.25;
    letter-spacing: -.025em;
    color: var(--green-deep);
    text-wrap: balance;
}
.section-desc {
    margin: 10px 0 0;
    max-width: 52em;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.8;
}
.section-note {
    flex: 0 0 auto;
    padding: 7px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    color: var(--muted);
    font-size: 11px;
    white-space: nowrap;
}

.text-link {
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--green-soft);
    color: var(--green-deep);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.text-link:hover { background: #dcebe0; }

/* ---------- 硬件卡 ---------- */
.hardware-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}
.hardware-card {
    display: flex;
    flex-direction: column;
    min-height: 224px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--card);
    transition: transform .2s, border-color .2s, box-shadow .2s;
}
.hardware-card:hover {
    transform: translateY(-3px);
    border-color: var(--line-strong);
    box-shadow: 0 16px 34px rgba(20, 51, 35, .09);
}
.hardware-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hardware-code {
    color: #a0b2a4;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
}
.mini-tag {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    background: var(--green-soft);
    color: #2a5d43;
    font-size: 10px;
    white-space: nowrap;
}
.hardware-card h3 {
    margin: 26px 0 8px;
    font-size: 17px;
    line-height: 1.4;
    letter-spacing: -.01em;
}
.hardware-card p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.75;
}
.card-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    min-height: 36px;
    margin-top: auto;
    padding: 0;
    border: 0;
    background: none;
    color: var(--green);
    font-size: 12px;
    font-weight: 600;
}
.card-link span { transition: transform .2s; }
.card-link:hover span { transform: translateX(3px); }

/* ---------- 公开知识库 ---------- */
.knowledge-section { padding-top: clamp(16px, 2.2vw, 24px); }

.knowledge-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}
.knowledge-card {
    display: flex;
    flex-direction: column;
    min-height: 210px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--card);
    transition: transform .2s, border-color .2s, box-shadow .2s;
}
.knowledge-card:hover {
    transform: translateY(-3px);
    border-color: #c1d4c5;
    box-shadow: 0 16px 34px rgba(20, 51, 35, .09);
}
.knowledge-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    min-height: 22px;
    margin-bottom: 14px;
}
.knowledge-meta time {
    margin-left: auto;
    color: #9aaba0;
    font-size: 10px;
    white-space: nowrap;
}
.crop-tag {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink-soft);
    font-size: 10px;
    white-space: nowrap;
}
.knowledge-card h3 {
    margin: 0 0 9px;
    font-size: 17px;
    line-height: 1.5;
    letter-spacing: -.012em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.knowledge-card p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.78;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.knowledge-empty {
    padding: 30px;
    border: 1px dashed #c7d8ca;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .72);
    text-align: center;
}
.knowledge-empty strong { display: block; color: var(--green-deep); font-size: 18px; }
.knowledge-empty p { max-width: 38em; margin: 8px auto 16px; color: var(--muted); font-size: 13px; }

/* ---------- 聊天区 ---------- */
.chat-section {
    padding: clamp(20px, 2.6vw, 30px) 8px clamp(30px, 3.8vw, 46px);
    scroll-margin-top: 92px;
}
.chat-head { margin-bottom: 16px; }

.chat-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.62fr) minmax(280px, .82fr);
    gap: 16px;
    align-items: start;
}

.chat-panel {
    display: flex;
    flex-direction: column;
    min-width: 0;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: var(--card);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.chat-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-bottom: 1px solid #edf2ed;
    background: #fbfdfa;
}
.chat-identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
.chat-avatar {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 12px;
    background: var(--green-deep);
    color: #f4e9cd;
    font-size: 18px;
    font-weight: 700;
}
.chat-identity h3 { margin: 0; font-size: 15px; line-height: 1.3; }
.chat-identity p { margin: 2px 0 0; color: var(--muted); font-size: 11px; }
.chat-tools { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.status-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid #dce9dd;
    border-radius: 999px;
    background: #f6faf5;
    color: #456052;
    font-size: 10px;
    white-space: nowrap;
}

.chat-body {
    height: 430px;
    min-height: 300px;
    padding: 18px;
    overflow-y: auto;
    background:
        radial-gradient(600px 260px at 10% 0%, #f7fbf4 0%, rgba(247, 251, 244, 0) 72%),
        #fcfdfb;
    scrollbar-width: thin;
}

.msg {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-bottom: 14px;
}
.msg.user { flex-direction: row-reverse; }
.avatar {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    border-radius: 9px;
    background: var(--green-soft);
    color: var(--green-deep);
    font-size: 12px;
    font-weight: 700;
}
.msg.user .avatar { background: #ece6d8; color: #725727; }

.bubble {
    max-width: min(88%, 620px);
    padding: 11px 13px;
    border: 1px solid #e3ece4;
    border-radius: 4px 14px 14px 14px;
    background: #fff;
    box-shadow: 0 4px 14px rgba(20, 51, 35, .04);
    min-width: 0;
}
.msg.user .bubble {
    border-radius: 14px 4px 14px 14px;
    border-color: #dfe7dc;
    background: #f0f6ee;
}
.bubble-text {
    color: var(--ink-soft);
    font-size: 13px;
    line-height: 1.8;
    white-space: pre-wrap;
    word-break: break-word;
}
.msg.user .bubble-text { color: var(--ink); }

.bubble-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
    padding-top: 7px;
    border-top: 1px dashed #e7eee7;
}
.source { color: #93a298; font-size: 10px; }
.thumb {
    display: inline-grid;
    place-items: center;
    width: 30px;
    height: 26px;
    margin-left: 2px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 7px;
    background: #fff;
    font-size: 12px;
    line-height: 1;
}
.thumb.active { border-color: #bfd9c5; background: var(--green-soft); }

.alert-line {
    margin-top: 8px;
    padding: 8px 10px;
    border-left: 3px solid var(--sand);
    border-radius: 0 8px 8px 0;
    background: #fdf8ec;
    color: #775d26;
    font-size: 11px;
    line-height: 1.7;
}

.quick {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 9px;
}
.quick button {
    min-height: 32px;
    padding: 4px 10px;
    border: 1px solid #d8e6da;
    border-radius: 999px;
    background: #f8fcf7;
    color: #2d5c43;
    font-size: 11px;
    text-align: left;
    line-height: 1.5;
}
.quick button:hover { background: var(--green-soft); border-color: #bdd6c3; }

.cards {
    display: grid;
    gap: 8px;
    margin-top: 9px;
}
.card {
    padding: 11px 12px;
    border: 1px solid #e4ece4;
    border-radius: 11px;
    background: #fbfdf9;
}
.card h4 { margin: 0 0 5px; font-size: 12px; line-height: 1.5; color: var(--green-deep); }
.card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.card-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 7px; }
.chip {
    display: inline-flex;
    padding: 2px 7px;
    border-radius: 999px;
    background: var(--green-soft);
    color: #356048;
    font-size: 10px;
}

.notice {
    display: grid;
    gap: 5px;
    margin-top: 8px;
    padding: 8px 10px;
    border: 1px solid #e6eadf;
    border-radius: 9px;
    background: #fbfaf4;
    color: #6c6247;
    font-size: 11px;
    line-height: 1.65;
}
.diag-badge {
    display: inline-flex;
    margin-bottom: 6px;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--sand-soft);
    color: #7c5b19;
    font-size: 10px;
}

.proactive {
    padding: 10px 11px;
    border: 1px solid #dfe9d9;
    border-radius: 10px;
    background: #f7fbf3;
    font-size: 11px;
    line-height: 1.75;
}
.proactive strong { display: block; margin-bottom: 3px; color: var(--green-deep); font-size: 12px; }
.proactive-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.proactive-actions button {
    min-height: 30px;
    padding: 0 10px;
    border: 1px solid #cfdfd2;
    border-radius: 8px;
    background: #fff;
    color: #315a43;
    font-size: 11px;
}

.loading .bubble-text { color: var(--muted); }
.loading .bubble-text::after {
    content: "";
    display: inline-block;
    width: 14px;
    height: 8px;
    margin-left: 5px;
    background: radial-gradient(circle, #7b9a84 0 2px, transparent 2.5px) 0 50% / 5px 6px repeat-x;
    animation: mgkf-dots .9s linear infinite;
}
@keyframes mgkf-dots { to { background-position: 15px 50%; } }

/* 输入区 */
.chat-compose {
    padding: 12px 16px 14px;
    border-top: 1px solid #edf2ed;
    background: #fff;
}
.slot-bar {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    padding-bottom: 9px;
}
.slot-bar label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 11px;
}
.slot-bar select {
    height: 32px;
    max-width: 126px;
    padding: 0 26px 0 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfdfa;
    color: var(--ink);
    font-size: 12px;
}
.slot-hint {
    flex: 1 1 100%;
    color: #94a398;
    font-size: 10px;
    line-height: 1.6;
}

.compose-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}
.compose-status { color: #96a59a; font-size: 10px; }
.link-btn {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--green);
    font-size: 11px;
    text-align: left;
}
.link-btn:hover { text-decoration: underline; text-underline-offset: 3px; }

.photo-preview {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    padding: 7px 9px;
    border: 1px solid #dbe8df;
    border-radius: 12px;
    background: #f5faf6;
}
.photo-preview[hidden] { display: none; }
.photo-preview img {
    width: 44px;
    height: 44px;
    border-radius: 9px;
    object-fit: cover;
    background: #e8f0e9;
}
.photo-preview-meta {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
    gap: 2px;
}
.photo-preview-name {
    overflow: hidden;
    color: var(--ink);
    font-size: 12px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.photo-preview-size { color: var(--muted); font-size: 11px; }
.photo-remove {
    flex: 0 0 auto;
    width: 28px;
    height: 28px;
    border: 1px solid #dbe8df;
    border-radius: 50%;
    background: #fff;
    color: var(--muted);
    font-size: 17px;
    line-height: 1;
}
.photo-remove:hover { border-color: #c9a3a3; color: #a14b4b; }

.photo-wrap { position: relative; flex: 0 0 auto; }
.photo-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid #cfe2d4;
    border-radius: 10px;
    background: #eef6f0;
    color: var(--green-deep);
    transition: background .2s, border-color .2s;
}
.photo-btn:hover { border-color: #9fc3aa; background: #e3f0e6; }
.voice-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid #cfe2d4;
    border-radius: 10px;
    background: #eef6f0;
    color: var(--green-deep);
    transition: background .2s, border-color .2s, box-shadow .2s;
}
.voice-btn:hover { border-color: #9fc3aa; background: #e3f0e6; }
.voice-btn.recording {
    border-color: #c96a5a;
    background: #fceeea;
    color: #a84636;
    box-shadow: 0 0 0 4px rgba(201, 106, 90, .14);
    animation: voicePulse 1.4s ease-in-out infinite;
}
@keyframes voicePulse {
    0%, 100% { box-shadow: 0 0 0 3px rgba(201, 106, 90, .12); }
    50% { box-shadow: 0 0 0 7px rgba(201, 106, 90, .05); }
}
.voice-status {
    margin-top: 6px;
    padding: 0 4px;
    color: #5f7568;
    font-size: 12px;
    line-height: 1.55;
}
.voice-status[hidden] { display: none; }
.voice-status.is-error { color: #a84636; }
.photo-menu {
    position: absolute;
    z-index: 20;
    bottom: calc(100% + 6px);
    left: 0;
    display: flex;
    min-width: 132px;
    flex-direction: column;
    padding: 4px;
    border: 1px solid #dbe8df;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(24, 48, 32, .14);
}
.photo-menu[hidden] { display: none; }
.photo-menu button {
    padding: 8px 10px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--ink);
    font-size: 13px;
    text-align: left;
}
.photo-menu button:hover { background: #eef6f0; color: var(--green-deep); }

.bubble.bubble-image { padding: 7px; }
.bubble-photo-link { display: block; line-height: 0; }
.bubble-photo {
    display: block;
    width: auto;
    max-width: 240px;
    max-height: 240px;
    border-radius: 10px;
    object-fit: cover;
    background: #eef2ee;
}
.bubble-image .bubble-text { margin-top: 7px; line-height: 1.6; }

.compose-row {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fbfdfa;
    transition: border-color .2s, box-shadow .2s;
}
.compose-row:focus-within {
    border-color: #a9c8b2;
    box-shadow: 0 0 0 4px rgba(30, 91, 61, .08);
}
.compose-row textarea {
    flex: 1;
    min-width: 0;
    min-height: 46px;
    max-height: 120px;
    padding: 4px 6px;
    border: 0;
    outline: 0;
    resize: vertical;
    background: transparent;
    color: var(--ink);
    font-size: 16px;
    line-height: 1.6;
}
.compose-row textarea::placeholder { color: #9cab9f; font-size: 13px; }
.send-btn {
    flex: 0 0 auto;
    min-width: 74px;
    min-height: 42px;
    padding: 0 14px;
    border: 1px solid var(--green);
    border-radius: 10px;
    background: var(--green);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
}
.send-btn:hover { background: var(--green-deep); }
.send-btn:disabled { opacity: .55; cursor: not-allowed; }
.send-btn.full { width: 100%; margin-top: 8px; }

.compose-tip {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin-top: 9px;
    color: #98a69c;
    font-size: 10px;
}

/* 侧栏 */
.chat-side { display: grid; gap: 12px; }
.side-card {
    padding: 17px;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--card);
}
.side-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 10px;
}
.side-head h3 { margin: 0; font-size: 14px; }
.side-hint { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.75; }
.account-card { background: linear-gradient(160deg, #fff 0%, #f7fbf5 100%); }
.account-card .side-hint { margin-bottom: 12px; }
.account-entry {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    margin-top: 8px;
    color: var(--green-deep);
    font-size: 12px;
    font-weight: 600;
}
.account-entry:hover { color: var(--green); text-decoration: underline; }

.diag-steps {
    display: grid;
    gap: 7px;
    margin: 0 0 10px;
    padding: 0;
    list-style: none;
}
.diag-steps li {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 0 10px;
    border: 1px solid #e4ece5;
    border-radius: 9px;
    color: #93a297;
    font-size: 11px;
}
.diag-steps li::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #d5e0d6;
}
.diag-steps li.done {
    border-color: #c8dfcd;
    background: #f2f9f1;
    color: #2d5b41;
}
.diag-steps li.done::before { background: #39a261; }

.side-list { margin: 0; padding-left: 16px; color: var(--muted); font-size: 11px; line-height: 1.85; }
.side-list li::marker { color: var(--sand); }

/* ---------- 公共页脚 ---------- */
.site-foot {
    margin-top: 24px;
    border-top: 1px solid var(--line);
    background: linear-gradient(180deg, rgba(255, 255, 255, .74), rgba(242, 246, 240, .72));
}
.foot-main {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(145px, .78fr) minmax(150px, .82fr) minmax(258px, 1.1fr);
    gap: 30px;
    align-items: start;
    padding: 32px 8px 28px;
}
.foot-brand { min-width: 0; }
.foot-brand-row { display: flex; align-items: center; gap: 11px; }
.foot-brand .site-mark { width: 38px; height: 38px; border-radius: 10px; font-size: 18px; }
.foot-brand .site-mark--double { font-size: 12px; }
.foot-brand-copy strong { display: block; color: var(--green-deep); font-size: 16px; line-height: 1.3; letter-spacing: .02em; }
.foot-brand-copy span { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; letter-spacing: .04em; }
.foot-slogan { max-width: 330px; margin: 15px 0 0; color: var(--ink-soft); font-size: 13px; line-height: 1.8; }
.foot-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 13px; }
.foot-tags a {
    padding: 3px 9px;
    border: 1px solid var(--line-strong);
    border-radius: 4px;
    color: var(--muted);
    font-size: 10.5px;
    line-height: 1.6;
    transition: border-color .18s ease, color .18s ease, background .18s ease;
}
.foot-tags a:hover { border-color: var(--green); background: var(--green-soft); color: var(--green-deep); }
.foot-contact-line { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 11px 0 0; color: #809086; font-size: 10.5px; line-height: 1.65; }
.foot-column h2 {
    margin: 3px 0 13px;
    color: var(--green-deep);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
}
.foot-column nav { display: grid; gap: 7px; justify-items: start; }
.foot-column nav a { color: var(--muted); font-size: 12px; line-height: 1.55; transition: color .18s ease; }
.foot-column nav a:hover { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.foot-qr-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.foot-qr-card {
    min-width: 0;
    margin: 0;
    padding: 8px 8px 9px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #fff;
}
.foot-qr-frame {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    aspect-ratio: 1;
    background: #f7faf6;
}
.foot-qr-img { width: 100%; height: 100%; object-fit: contain; }
.foot-qr-fallback { padding: 8px; color: var(--muted); font-size: 10px; line-height: 1.6; text-align: center; }
.foot-qr-card figcaption { padding: 7px 2px 0; text-align: center; }
.foot-qr-card figcaption strong { display: block; color: var(--green-deep); font-size: 11px; font-weight: 600; line-height: 1.5; }
.foot-qr-card figcaption span { display: block; margin-top: 1px; color: var(--muted); font-size: 9.5px; line-height: 1.45; }
.foot-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px 20px;
    padding: 13px 8px 18px;
    border-top: 1px solid #e8eee7;
    color: #809086;
    font-size: 11px;
}
.foot-legal { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 0; line-height: 1.7; }
.foot-legal > * + *::before { content: "·"; color: #a8b7ac; margin: 0 8px 0 4px; }
.foot-legal a { color: #71857a; }
.foot-legal a:hover { color: var(--green); }
.foot-legal .foot-sitemap { text-decoration: underline; text-underline-offset: 2px; }
.foot-actions { display: flex; flex-wrap: wrap; gap: 7px; }
.foot-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 31px;
    padding: 0 10px;
    border: 1px solid var(--line-strong);
    border-radius: 5px;
    background: #fff;
    color: var(--green-deep);
    font-size: 10.5px;
    line-height: 1.4;
    transition: border-color .18s ease, background .18s ease, color .18s ease;
}
.foot-action:hover { border-color: var(--green); background: var(--green-soft); color: var(--green-deep); }
.foot-action svg { flex: 0 0 auto; }

/* ---------- 弹窗 ---------- */
.modal {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(9, 24, 16, .48);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}
.modal-card {
    position: relative;
    width: min(430px, 100%);
    max-height: calc(100vh - 36px);
    overflow-y: auto;
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, .6);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 30px 70px rgba(7, 22, 14, .28);
}
.modal-kicker { margin: 0 0 4px; color: var(--green); font-size: 10px; letter-spacing: .1em; }
.modal-card h2 { margin: 0 0 6px; color: var(--green-deep); font-size: 22px; letter-spacing: -.02em; }
.modal-card > .side-hint { margin: 0 0 14px; font-size: 12px; }
.modal-card label { display: block; margin-bottom: 11px; color: var(--ink-soft); font-size: 12px; font-weight: 500; }
.modal-card input[type=tel],
.modal-card input[type=password],
.modal-card input[type=text],
.modal-card input[type=number] {
    display: block;
    width: 100%;
    height: 43px;
    margin-top: 5px;
    padding: 0 11px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fbfdfa;
    color: var(--ink);
    font-size: 16px;
}
.modal-card textarea {
    display: block;
    width: 100%;
    min-height: 108px;
    margin-top: 5px;
    padding: 10px 11px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: #fbfdfa;
    color: var(--ink);
    font-size: 16px;
    line-height: 1.6;
    resize: vertical;
}
.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: #fff;
    color: var(--muted);
    font-size: 19px;
    line-height: 1;
}
.records-card {
    width: min(680px, 100%);
}
.records-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-right: 36px;
}
.records-head h2 { margin: 0; }
.records-count { color: var(--muted); font-weight: 400; font-size: 13px; }
.records-actions { display: flex; align-items: center; gap: 8px; }
.record-del {
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--muted);
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
}
.record-del:hover { color: #c0392b; background: #fbeeee; }
.records-list {
    display: grid;
    gap: 0;
    max-height: min(54vh, 460px);
    overflow-y: auto;
    margin-top: 4px;
    border-top: 1px solid var(--line);
}
.records-empty {
    padding: 34px 0;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}
.record-item {
    padding: 13px 0;
    border-bottom: 1px solid #edf2ed;
}
.record-item:last-child { border-bottom: 0; }
.record-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.record-top strong {
    flex: 1 1 auto;
    min-width: 0;
    color: var(--green-deep);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.6;
}
.record-top time {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 10.5px;
}
.record-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}
.record-meta span {
    padding: 2px 8px;
    border-radius: 999px;
    background: #f1f7ee;
    color: #5b7560;
    font-size: 10px;
}
.record-answer {
    display: -webkit-box;
    overflow: hidden;
    margin: 7px 0 0;
    color: #66776a;
    font-size: 11.5px;
    line-height: 1.75;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}
.check-line {
    display: flex !important;
    align-items: center;
    gap: 8px;
    padding: 9px 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fbfdfa;
}
.check-line input { width: 17px; height: 17px; accent-color: var(--green); }
.alert-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.captcha-line {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 5px;
}
.captcha-line input[type=text] {
    width: auto;
    flex: 1 1 0;
    min-width: 0;
}
.captcha-line img {
    flex: none;
    width: 132px;
    height: 44px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f6f3e9;
    cursor: pointer;
}
.captcha-line button {
    flex: none;
    padding: 4px 2px;
    border: 0;
    background: none;
    color: var(--green);
    font: inherit;
    font-size: 11px;
    white-space: nowrap;
    cursor: pointer;
}
.captcha-line button:hover { color: var(--green-deep); text-decoration: underline; }

.form-error {
    margin: 4px 0 8px;
    padding: 8px 10px;
    border: 1px solid #efcfca;
    border-radius: 8px;
    background: #fdf3f1;
    color: var(--danger);
    font-size: 11px;
    line-height: 1.6;
}

.modal-switch {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin: 14px 0 0;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    color: var(--ink-soft);
    font-size: 12px;
}
.link-btn {
    padding: 0;
    border: 0;
    background: none;
    color: var(--green-deep);
    font: inherit;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}
.link-btn:hover { color: var(--green); }
.link-btn[disabled] {
    color: #98a292;
    text-decoration: none;
    cursor: not-allowed;
}
.sms-line {
    display: flex;
    align-items: stretch;
    gap: 8px;
    margin-top: 5px;
}
.sms-line input[type=text] {
    flex: 1 1 0;
    width: auto;
    min-width: 0;
    margin-top: 0;
}
.sms-line button {
    flex: none;
    min-width: 96px;
    padding: 0 10px;
    border: 1px solid rgba(35, 92, 55, .28);
    border-radius: 10px;
    background: var(--green-soft);
    color: var(--green-deep);
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}
.sms-line button:disabled {
    border-color: var(--line);
    background: #f2f4ef;
    color: #98a292;
    cursor: not-allowed;
}
.register-note {
    margin: 8px 0 0;
    color: var(--gold-deep, #8a6a2a);
    font-size: 11px;
    line-height: 1.6;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1050px) {
    .site-head { gap: 12px; }
    .site-nav { margin-left: 0; gap: 0; }
    .site-nav a { padding: 0 9px; font-size: 12px; }
    .hero-section { gap: 30px; }
    .hardware-grid { grid-template-columns: repeat(2, 1fr); }
    .chat-body { height: 400px; }
}

@media (max-width: 900px) {
    .site-shell { width: min(100% - 28px, 760px); }
    .site-head {
        flex-wrap: wrap;
        padding: 10px 12px;
    }
    .site-nav {
        order: 4;
        width: 100%;
        overflow-x: auto;
        padding-top: 7px;
        border-top: 1px solid #edf1ed;
        scrollbar-width: none;
    }
    .site-nav::-webkit-scrollbar { display: none; }
    .site-actions { margin-left: auto; }
    .online-pill { display: none; }

    .hero-section {
        grid-template-columns: 1fr;
        gap: 28px;
        padding-top: 40px;
    }
    .hero-copy h1 { max-width: 16em; font-size: clamp(36px, 8vw, 50px); }
    .hero-visual { order: -1; }
    .section-block, .chat-section { scroll-margin-top: 138px; }
    .stat-strip { grid-template-columns: repeat(2, 1fr); }
    .stat-strip > div:nth-child(2) { border-right: 0; }
    .stat-strip > div:nth-child(-n+2) { border-bottom: 1px solid #e8eee8; }

    .section-head { flex-wrap: wrap; align-items: flex-start; }
    .knowledge-grid { grid-template-columns: repeat(2, 1fr); }
    .chat-layout { grid-template-columns: 1fr; }
    .chat-side { grid-template-columns: repeat(2, 1fr); }
    .chat-side > .account-card { grid-column: 1 / -1; }
    .chat-body { height: 400px; }

    .foot-main {
        grid-template-columns: minmax(0, 1.4fr) minmax(110px, .7fr) minmax(120px, .75fr);
        gap: 20px;
    }
    .foot-qr-grid { grid-column: 1 / -1; max-width: 340px; }
}

@media (max-width: 640px) {
    .site-shell { width: calc(100% - 20px); }
    .site-head { margin-top: 8px; border-radius: 15px; }
    .site-brand { gap: 8px; }
    .site-mark { width: 38px; height: 38px; font-size: 19px; }
    .site-mark--double { font-size: 13px; }
    .brand-text small { display: none; }
    .site-actions { gap: 6px; }
    .ghost-btn { min-height: 40px; padding: 0 10px; font-size: 12px; }
    .site-actions .ghost-btn { min-height: 40px; padding: 0 10px; font-size: 12px; }
    .site-actions #btn-logs { display: none; }

    .hero-section { padding: 26px 2px 20px; gap: 20px; }
    .hero-copy h1 { font-size: 34px; line-height: 1.18; }
    .hero-desc { font-size: 14px; }
    .hero-actions .btn-main, .hero-actions .btn-soft { flex: 1 1 46%; padding: 0 14px; }
    .hero-asks { display: grid; grid-template-columns: 1fr; }
    .hero-asks button { width: 100%; }
    .hero-visual { border-radius: 20px; }
    .hero-visual figcaption { left: 14px; right: 14px; bottom: 13px; }
    .hero-visual figcaption span:last-child { font-size: 13px; }
    .hero-float { top: 10px; right: 10px; padding: 8px 10px; }
    .hero-float small { display: none; }

    .stat-strip { margin: 0 2px 14px; border-radius: 15px; }
    .stat-strip > div { padding: 14px 16px; }
    .stat-strip strong { font-size: 22px; }

    .section-block { padding: 15px 2px 24px; }
    .section-head { margin-bottom: 14px; }
    .section-head h2 { font-size: 25px; }
    .section-note { order: 3; }
    .hardware-grid { grid-template-columns: 1fr; gap: 10px; }
    .hardware-card { min-height: 0; }
    .hardware-card h3 { margin-top: 16px; }
    .knowledge-grid { grid-template-columns: 1fr; }
    .knowledge-card { min-height: 0; }
    .knowledge-card h3 { font-size: 16px; }

    .chat-section { padding: 22px 2px 34px; }
    .chat-panel { border-radius: 18px; }
    .chat-title { flex-wrap: wrap; align-items: flex-start; padding: 13px 14px; }
    .chat-tools { width: 100%; justify-content: space-between; }
    .chat-body { height: 390px; padding: 13px; }
    .bubble { max-width: calc(100% - 42px); }
    .chat-compose { padding: 10px 12px 12px; }
    .slot-bar { gap: 7px 8px; }
    .slot-bar label { flex: 1 1 42%; }
    .slot-bar select { flex: 1; max-width: none; width: 100%; }
    .slot-hint { font-size: 10px; }
    .compose-row textarea { min-height: 44px; }
    .send-btn { min-width: 62px; padding: 0 11px; }
    .photo-btn { width: 40px; height: 40px; }
    .bubble-photo { max-width: 200px; max-height: 200px; }
    .photo-preview { gap: 8px; }
    .photo-preview-name { font-size: 11px; }
    .chat-side { grid-template-columns: 1fr; }
    .chat-side > .account-card { grid-column: auto; }

    .foot-main { grid-template-columns: 1fr 1fr; gap: 18px; padding: 24px 2px 18px; }
    .foot-brand { grid-column: 1 / -1; }
    .foot-qr-grid { grid-column: 1 / -1; max-width: 340px; }
    .foot-bottom { padding: 12px 2px 18px; flex-direction: column; align-items: flex-start; }
    .alert-grid { grid-template-columns: 1fr; }
}

@media (max-width: 380px) {
    .site-brand .brand-text strong { font-size: 14px; }
    .site-actions .ghost-btn { padding: 0 8px; }
    .hero-copy h1 { font-size: 30px; }
    .stat-strip > div { padding: 12px 13px; }
    .stat-strip strong { font-size: 20px; }
    .chat-body { height: 360px; }
    .compose-tip { gap: 4px 10px; }
    .captcha-line { gap: 5px; }
    .captcha-line img { width: 108px; height: 38px; }
}

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

/* 嵌入模式：只保留客服区，供 iframe / App WebView 使用。阳润科技 */
.embed-mode{background:#f5f8f6}
.embed-mode .site-head,
.embed-mode .hero-section,
.embed-mode .stat-strip,
.embed-mode .section-block,
.embed-mode .site-foot,
.embed-mode .skip-link{display:none!important}
.embed-mode .site-shell{width:100%;max-width:none;padding:0;margin:0}
.embed-mode main{padding:0;margin:0}
.embed-mode .chat-section{padding:0;margin:0}
.embed-mode .chat-shell{grid-template-columns:1fr;gap:0}
.embed-mode .chat-side{display:none}
.embed-mode .chat-panel{border-radius:0;border:0;box-shadow:none;min-height:100vh}

/* 返回顶部：半透明绿色圆钮，跟“眸耕助手”一致。阳润科技 */
.back-to-top {
    position: fixed;
    z-index: 70;
    right: clamp(18px, calc((100vw - 1180px) / 2 - 64px), 72px);
    bottom: 30px;
    display: none;
    place-items: center;
    width: 54px;
    height: 54px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(30, 91, 61, .72);
    color: #fff;
    box-shadow: 0 10px 26px rgba(18, 58, 40, .22);
    cursor: pointer;
    transition: background .2s, opacity .2s, transform .2s;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
}

.back-to-top.is-visible {
    display: grid;
}

.back-to-top:hover { background: rgba(30, 91, 61, .9); }
.back-to-top:active { transform: scale(.96); }
.back-to-top:focus-visible { outline: 3px solid rgba(255, 255, 255, .85); outline-offset: 3px; }

.embed-mode .back-to-top { display: none !important; }

@media (max-width: 640px) {
    .back-to-top {
        right: 14px;
        bottom: 18px;
        width: 46px;
        height: 46px;
    }
    .back-to-top svg { width: 20px; height: 20px; }
}

/* 整站通知：页面最顶部的单条横幅，关闭后本条不再出现。 */
.site-notice {
    position: relative;
    z-index: 90;
    width: 100%;
    padding: 9px 46px 9px 20px;
    border-bottom: 1px solid #cfe4d1;
    background: #edf7ee;
    color: #245b31;
    font-size: 13px;
    line-height: 1.7;
}

.site-notice--notice {
    border-bottom-color: #f0d8b0;
    background: #fff5e6;
    color: #7a4a12;
}

.site-notice--warning {
    border-bottom-color: #f0c9c9;
    background: #fdecec;
    color: #8a2424;
}

.site-notice-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: center;
    gap: 4px 10px;
    max-width: 1180px;
    margin: 0 auto;
    text-align: center;
}

.site-notice-inner strong {
    flex: 0 0 auto;
    font-weight: 700;
}

.site-notice-inner span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.site-notice-inner a {
    flex: 0 0 auto;
    color: inherit;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.site-notice-close {
    position: absolute;
    top: 50%;
    right: 14px;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: inherit;
    font-size: 20px;
    line-height: 26px;
    cursor: pointer;
    transform: translateY(-50%);
}

.site-notice-close:hover { background: rgba(0, 0, 0, .06); }
.site-notice-close:focus-visible { outline: 2px solid currentColor; outline-offset: 1px; }

@media (max-width: 640px) {
    .site-notice {
        padding: 8px 40px 8px 14px;
        font-size: 12px;
        text-align: left;
    }
    .site-notice-inner { justify-content: flex-start; text-align: left; }
    .site-notice-close { right: 8px; }
}


/* 前台通知中心入口：顶部操作区绿框黄铃铛，放在“在线”和“个人中心”之间 */
.notice-bell {
    position: relative;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1.5px solid #2f7d4f;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 1px 3px rgba(18, 58, 40, .08);
    text-decoration: none;
    transition: background .16s ease, border-color .16s ease;
}
.notice-bell:hover { background: #f4faf5; }
.notice-bell:focus-visible { outline: 3px solid rgba(47, 125, 79, .35); outline-offset: 2px; }
.notice-bell.is-unread { border-color: #2f7d4f; }
.notice-bell-icon { display: inline-flex; }
.notice-bell-badge {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    background: #d94a3a;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .18);
}
@media (max-width: 640px) {
    .notice-bell { width: 40px; height: 40px; }
}
@media print { .notice-bell { display: none; } }
