* { box-sizing: border-box; }
body {
    margin: 0;
    background: #ffffff;
    color: #4a3b2a;
    font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
}
.app {
    width: 100%;
    margin: 0 auto;
    min-height: 100vh;
    background: #ffffff;
    padding: 12px 10px 84px;
}
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 4px 2px 12px;
}
.brand-wrap{
    display:flex;
    align-items:center;
    gap:8px;
    min-width:0;
    flex:1;
}
.brand-icon{
    font-size:20px;
    color:#f06a8e;
}
.brand-logo-img{
    height:28px;
    max-width:150px;
    object-fit:contain;
    flex:0 0 auto;
}
.topbar h1 {
    margin: 0;
    /* 长标题（如 12 字机构名）自适应：字号随屏宽缩放并允许换行，保证完整显示 */
    font-size: clamp(13px, 4.5vw, 18px);
    letter-spacing: .5px;
    color: #5c3f21;
    white-space: normal;
    word-break: break-word;
    line-height: 1.3;
}
.home-search{
    flex:0 1 170px;
    min-width:96px;
    height:40px;
    background:#ffffff;
    border:1px solid #e6e1d8;
    border-radius:0;
    display:flex;
    align-items:center;
    padding:0 12px;
    gap:8px;
}
.home-search input{
    border:0;background:transparent;outline:none;flex:1;min-width:0;
    font-size:14px;color:#8a6c4f;
}
.home-search button{
    border:0;
    background:transparent;
    padding:0;
    margin:0;
    color:#9b8f7f;
    cursor:pointer;
    display:inline-flex;
    align-items:center;
    justify-content:center;
}
.home-search i{color:inherit}
.hero-slider {
    position: relative;
    margin-top: 4px;
}
.slides {
    position: relative;
    height: 130px;
}
.slide {
    position: absolute;
    inset: 0;
    border-radius: 0;
    padding: 18px 16px;
    color: #fff;
    text-decoration: none;
    background: linear-gradient(120deg, #f6b15c, #f2cb72);
    opacity: 0;
    transform: translateX(16px);
    transition: opacity .35s ease, transform .35s ease;
    overflow: hidden;
}
.slide.with-image {
    background-size: cover;
    background-position: center;
}
.slide-mask {
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(95, 60, 28, .25), rgba(95, 60, 28, .08));
    pointer-events: none;
}
.slide.active {
    opacity: 1;
    transform: translateX(0);
    z-index: 1;
}
.slide h2, .slide p {
    position: relative;
    z-index: 2;
}
.slide h2 {
    margin: 0 0 8px;
    font-size: clamp(22px, 6.5vw, 30px);
}
.slide p {
    margin: 0;
    font-size: clamp(14px, 4.2vw, 18px);
}
.slider-dots {
    position: absolute;
    right: 12px;
    bottom: 8px;
    display: flex;
    gap: 6px;
    z-index: 3;
}
.dot-btn {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    border: 0;
    background: rgba(255,255,255,.65);
    padding: 0;
}
.dot-btn.active { background: #fff; }
.notice {
    margin-top: 10px;
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
    font-size: 15px;
    display: flex;
    gap: 10px;
    align-items: center;
    width: 100%;
    overflow: hidden;
}
.notice strong { color: #6a4a2a; }
.notice-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    width: auto;
    height: auto;
    border-radius: 0;
    padding: 0;
    margin-right: 2px;
}
.notice-badge i {
    font-size: 18px;
    color: #2aae67;
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.notice span {
    color: #7c6142;
    flex: 1;
    min-width: 0;
    word-break: break-word;
}
.notice-marquee .marquee {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    position: relative;
}
.marquee-track {
    display: inline-flex;
    align-items: center;
    gap: 40px;
    white-space: nowrap;
    will-change: transform;
    animation: marqueeMove 14s linear infinite;
}
.marquee-item {
    display: inline-block;
    color: #7c6142;
}
.notice-marquee:hover .marquee-track,
.notice-marquee:active .marquee-track {
    animation-play-state: paused;
}
@keyframes marqueeMove {
    from { transform: translateX(0); }
    to { transform: translateX(-50%); }
}
.quick-nav{
    margin-top:10px;
    background:#fff;
    border-radius:12px;
    padding:10px 6px 8px;
    display:grid;
    grid-template-columns:repeat(4,minmax(0,1fr));
    gap:4px;
}
.quick-nav a{
    text-decoration:none;
    color:#2b2b2b;
    display:flex;flex-direction:column;align-items:center;gap:6px;
    font-size:12px;
}
.quick-nav i{font-size:24px;color:#f36488}
.hot-head{margin-top:14px;padding:0 2px}
.hot-head h2{margin:0;font-size:clamp(24px, 6.5vw, 34px);color:#ef5e84;display:flex;align-items:center;gap:8px}
.hot-head h2 span{font-size:14px;background:#4e95ff;color:#fff;padding:1px 6px;border-radius:10px}
.hot-head p{margin:4px 0 0;color:#8a6c4f;font-size:13px}
.home-search-empty{
    margin:10px 4px 0;
    font-size:13px;
    color:#9d7b58;
}
.grid {
    margin-top: 10px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.home-footer-meta{
    margin:14px 4px 0;
    padding:10px 8px 0;
    border-top:1px solid #efe4d5;
    text-align:center;
}
.home-footer-meta p{
    margin:4px 0;
    font-size:12px;
    color:#9c876d;
    line-height:1.5;
}
.project-card {
    min-height: 100px;
    border-radius: 0;
    color: #fff;
    text-decoration: none;
    padding: 8px 10px 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 4px 12px rgba(125, 90, 48, 0.16);
    transition: transform .18s ease, box-shadow .18s ease;
    position: relative;
    overflow: hidden;
}
.project-card:active {
    transform: scale(0.98);
    box-shadow: 0 3px 8px rgba(125, 90, 48, 0.14);
}
.card-illu {
    position: absolute;
    right: 6px;
    bottom: 6px;
    width: clamp(72px, 26vw, 108px);
    height: clamp(50px, 18vw, 74px);
    max-width: 58%;
    opacity: 0.42;
    pointer-events: none;
}
.card-illu i {
    position: absolute;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.illu-main {
    right: 10px;
    bottom: 10px;
    font-size: clamp(22px, 8vw, 34px);
    background: linear-gradient(140deg, #fff6d5 0%, #ffdcb8 48%, #ffe9cf 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 2px 8px rgba(35, 25, 15, 0.14);
}
.illu-sub {
    right: clamp(34px, 12vw, 48px);
    bottom: clamp(30px, 10.5vw, 44px);
    font-size: clamp(11px, 4vw, 16px);
    background: linear-gradient(145deg, #ffe9cd 0%, #ffd8bd 50%, #fff1dd 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    text-shadow: 0 1px 6px rgba(22, 45, 66, 0.16);
}
.project-card h3 {
    margin: 12px 0 4px;
    font-size: 16px;
    line-height: 1.2;
    font-weight: 700;
    position: relative;
    z-index: 1;
}
.project-card p {
    margin: 0;
    font-size: 11px;
    opacity: .95;
    position: relative;
    z-index: 1;
}
.project-metric{
    position:absolute;
    right:8px;
    bottom:6px;
    z-index:1;
    font-size:12px;
    font-weight:700;
    color:rgba(255,255,255,.92);
    text-shadow:0 1px 2px rgba(0,0,0,.18);
    pointer-events:none;
    white-space:nowrap;
}
.card-orange { background: linear-gradient(120deg, #ef9a4a, #f3b262); }
.card-yellow { background: linear-gradient(120deg, #eebf64, #f2d07e); }
.card-purple { background: linear-gradient(120deg, #8a78c8, #9a8ed6); }
.card-green { background: linear-gradient(120deg, #8cc46f, #9fd281); }
.card-blue { background: linear-gradient(120deg, #7ea9e7, #90b7ee); }
.card-indigo { background: linear-gradient(120deg, #7f8ad8, #919ae1); }
.card-cyan { background: linear-gradient(120deg, #67b8c4, #79c4cf); }
.card-pink { background: linear-gradient(120deg, #dd8aac, #e49ab8); }
.card-teal { background: linear-gradient(120deg, #62b29f, #73bdab); }

.invite-modal[hidden] { display: none; }
.home-floating-entry{
    position:fixed;
    right:14px;
    bottom:110px;
    z-index:88;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:6px;
    padding:0;
    border-radius:0;
    background:transparent;
    border:0;
    box-shadow:none;
    text-decoration:none;
    color:#6a4a2a;
    max-width:min(46vw,180px);
    animation:xgFloatPulse 1.8s ease-in-out infinite;
}
.home-floating-entry img{
    width:clamp(64px,18vw,92px);height:clamp(64px,18vw,92px);object-fit:contain;flex:0 0 auto;
    border-radius:10px;background:rgba(255,255,255,.92);box-shadow:0 4px 14px rgba(0,0,0,.18);
}
.home-floating-entry span{
    font-size:18px;
    line-height:1.15;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
    text-shadow:0 1px 2px rgba(255,255,255,.65);
}
@keyframes xgFloatPulse{
    0%{transform:scale(1);}
    50%{transform:scale(.9);}
    100%{transform:scale(1);}
}
/* 悬浮图标点击放大预览层（无跳转链接时展示微信二维码等大图） */
.xg-zoom-modal{
    position:fixed;
    inset:0;
    z-index:120;
}
.xg-zoom-backdrop{
    position:absolute;
    inset:0;
    background:rgba(17,24,39,.72);
    backdrop-filter:blur(2px);
}
.xg-zoom-panel{
    position:absolute;
    left:50%;
    top:50%;
    transform:translate(-50%,-50%);
    margin:0;
    max-width:min(86vw,420px);
    background:#fff;
    border-radius:14px;
    padding:14px;
    box-shadow:0 16px 48px rgba(0,0,0,.35);
    text-align:center;
}
.xg-zoom-panel img{
    display:block;
    width:100%;
    max-height:70vh;
    object-fit:contain;
    border-radius:8px;
}
.xg-zoom-panel figcaption{
    margin-top:10px;
    font-size:15px;
    color:#374151;
    line-height:1.4;
}
.xg-zoom-close{
    position:absolute;
    top:-14px;
    right:-14px;
    width:34px;
    height:34px;
    border-radius:50%;
    border:0;
    background:#fff;
    color:#111827;
    font-size:20px;
    line-height:1;
    cursor:pointer;
    box-shadow:0 4px 12px rgba(0,0,0,.25);
}
.home-floating-entry#xgFloatEntry{
    cursor:pointer;
}
.invite-modal {
    position: fixed;
    inset: 0;
    z-index: 99;
}
.invite-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
}
.invite-panel {
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(92vw, 430px);
    transform: translate(-50%, -50%);
    border-radius: 0;
    padding: 16px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    box-shadow: 0 24px 60px rgba(2, 6, 23, 0.18);
}
.invite-panel h3 {
    margin: 0 0 6px;
    font-size: 24px;
    color: #0f172a;
}
.invite-panel p {
    margin: 0 0 10px;
    color: #475569;
    font-size: 14px;
}
.invite-panel input {
    width: 100%;
    height: 44px;
    border: 1px solid #d1d5db;
    border-radius: 0;
    padding: 0 12px;
    font-size: 16px;
    background: #ffffff;
    color: #0f172a;
}
/* xg-css-ver:v27 —— 部署验证标记：服务器上本文件顶部应能看到此标记；
   若前台样式没变化，先确认 index.php 已引用 home.css?v=27 并强制刷新浏览器 */
/* V25：仅邀请码输入框强制大写显示（邀请码不区分大小写）；
   微信号/手机号保留用户输入的大小写原样 */
#inviteCodeInput { text-transform: uppercase; }
.invite-error {
    min-height: 20px;
    margin-top: 6px;
    color: #ef4444;
    font-size: 13px;
}
.invite-panel button {
    width: 100%;
    height: 42px;
    border: 0;
    border-radius: 0;
    cursor: pointer;
    font-size: 16px;
    margin-top: 8px;
}
#inviteSubmitBtn { background: #2563eb; color: #fff; }
#inviteCancelBtn { background: #f3f4f6; color: #0f172a; border: 1px solid #e5e7eb; }

@media (max-width: 420px) {
    .topbar h1 { font-size: clamp(12px, 3.9vw, 15px); }
    .slides { height: 118px; }
    .slide h2 { font-size: 24px; }
    .slide p { font-size: 14px; }
    .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .project-card { min-height: 96px; }
}

@media (max-width: 360px) {
    .app { padding: 12px 10px 20px; }
    .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .notice { font-size: 14px; }
    .notice strong { width: 100%; }
}

@media (min-width: 700px) {
    body { padding: 20px 0; }
    .app {
        width: min(100%, 1120px);
        border-radius: 0;
        box-shadow: 0 10px 30px rgba(25, 48, 78, 0.08);
        padding: 18px 16px 28px;
    }
    .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
