/*
 * 活动首页：海报优先、清晰的内容层次、克制的品牌色。
 * 仅作用于 body.ui-home，不改变管理页及报名流程的公共样式。
 */
body.ui-home {
    --home-ink: #24272b;
    --home-muted: #626971;
    --home-line: #f0f1f3;
    --home-surface: #fafbfc;
    --home-accent: #b46500;
    position: relative;
    isolation: isolate;
    background: #fff;
    color: var(--home-ink);
}
body.ui-home .win-wrap {
    position: relative;
    z-index: auto;
}
body.ui-home .win-wrap {
    position: relative;
    z-index: 3;
}

body.ui-home .win-wrap {
    width: calc(100% - 64px);
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}
body.ui-home .win-area,
body.ui-home .win-top .win-login,
body.ui-home .win-top .win-user,
body.ui-home .win-setting { border-color: var(--home-line); }
body.ui-home .win-nav-second .tab ul,
body.ui-home .ui-filter {
    width: calc(100% - 64px);
    max-width: 1200px;
}
body.ui-home.ui-activity-list .win-menu-wrap,
body.ui-home.ui-activity-detail .win-dist,
body.ui-home.ui-activity-calendar .win-dist {
    position: relative;
    z-index: 3;
}
/* 首页主海报，保持运营海报完整的宽高比；顶部留白隔开导航。 */
body.ui-home .home-main { padding-top: 32px; }
body.ui-home .home-title-accent {
    position: relative;
    z-index: 0;
    display: inline-block;
    float: none;
    padding-left: 0;
    color: inherit;
    font: inherit;
    line-height: inherit;
}
body.ui-home .win-acitve-title .home-title-accent:before {
    display: none !important;
    content: none !important;
}
body.ui-home .home-title-accent:after {
    content: "";
    position: absolute;
    z-index: -1;
    left: 8%;
    right: -4%;
    bottom: 3px;
    height: 8px;
    border-radius: 2px;
    background: rgba(242, 150, 0, .42);
    transform: rotate(-1deg);
}
body.ui-home .ui-banner {
    width: 100%;
    height: auto;
    aspect-ratio: 1200 / 353;
    margin: 0;
    border-radius: 6px;
    background: var(--home-surface);
    box-shadow: none;
}
body.ui-home .ui-banner .swiper-slide img { object-fit: contain; }
body.ui-home .ui-banner .swiper-pagination-bullet { border-radius: 2px; width: 18px; height: 3px; }
body.ui-home .ui-banner .swiper-pagination-bullet-active { width: 36px; }
body.ui-home .ui-swiper-btn { border-radius: 4px; box-shadow: none; }
body.ui-home .ui-banner:focus-within .ui-swiper-btn,
body.ui-home .ui-carousel:focus-within .ui-swiper-btn { opacity: 1; }
body.ui-home .ui-ad {
    width: 100%;
    margin: 32px 0 0;
    border-radius: 4px;
    box-shadow: none;
}

/* 板块之间保留留白，海报与信息由同一张浅底卡片承载。 */
body.ui-home .home-section { margin-top: 44px; }
body.ui-home .win-acitve-title { width: 100%; margin: 0 0 22px; padding: 0; }
body.ui-home .win-acitve-title h2 {
    margin: 0;
    color: var(--home-ink);
    font-size: 23px;
    font-weight: 600;
    line-height: 32px;
}
body.ui-home .win-acitve-title a { flex-shrink: 0; margin-left: 20px; color: var(--home-muted); font-size: 13px; }
body.ui-home .win-acitve-title a:hover { color: var(--home-accent); }
body.ui-home .home-section--brand .win-acitve-title { display: flex; align-items: baseline; justify-content: space-between; }
body.ui-home .home-section-heading { display: flex; align-items: baseline; gap: 24px; min-width: 0; }
body.ui-home .home-section-heading p { margin: 0; color: var(--home-muted); font-size: 13px; line-height: 22px; }
body.ui-home .win-acitve-list { width: 100%; margin: 0; padding: 0; }
body.ui-home .win-acitve-list:not(.win-scroll-list) {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 32px 24px;
    overflow: visible;
}
body.ui-home.ui-activity-list .win-acitve-list:not(.win-scroll-list) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
body.ui-home .home-section--recommend .win-acitve-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
body.ui-home .win-acitve-list li {
    min-width: 0;
    width: auto;
    margin: 0;
    border: 1px solid var(--home-line);
    border-radius: 8px;
    background: #fcfcfd;
    box-shadow: none;
    transition: none;
}
body.ui-home .win-acitve-list li:hover { transform: none; box-shadow: none; }
body.ui-home .win-acitve-list li.home-card { cursor: pointer; }
body.ui-home .win-acitve-list li.home-card:focus-visible { outline: 2px solid var(--home-accent); outline-offset: 2px; }
body.ui-home .win-acitve-list .active-img {
    position: relative;
    flex-shrink: 0;
    height: auto;
    aspect-ratio: 16 / 9;
    border-radius: 7px 7px 0 0;
    background: var(--home-surface);
    overflow: hidden;
}
body.ui-home .win-acitve-list .active-img img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: none;
}
body.ui-home .win-acitve-list li:hover .active-img img { transform: none; }
body.ui-home .win-acitve-list .acitve-top { padding: 18px 20px 0; }
body.ui-home .acitve-top .title {
    display: -webkit-box;
    min-height: 0;
    margin: 0 0 10px;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    white-space: normal;
    overflow-wrap: anywhere;
    font-size: 16px;
    line-height: 25px;
    font-weight: 600;
}
body.ui-home .acitve-top .title a { color: var(--home-ink); }
body.ui-home .acitve-top .title a:hover { color: var(--home-accent); }
body.ui-home .acitve-top .address,
body.ui-home .acitve-top .time { color: var(--home-muted); font-size: 12px; line-height: 21px; }
body.ui-home .acitve-top .address .fa,
body.ui-home .acitve-top .time .fa { background-color: #858c93; }
body.ui-home .home-section--recommend .title { font-size: 18px; line-height: 27px; }
body.ui-home .home-card-meta { display: block; }
body.ui-home .home-card-meta .time,
body.ui-home .home-card-meta .address { display: block; margin: 0 0 4px; }
body.ui-home .acitve-bottom {
    height: auto;
    min-height: 44px;
    margin: 14px 20px 0;
    padding: 12px 0 16px;
    border-color: var(--home-line);
}
body.ui-home .acitve-bottom .logo { width: 20px; height: 20px; border-radius: 50%; border-color: var(--home-line); }
body.ui-home .acitve-bottom .active-com { font-size: 12px; color: var(--home-muted); }
body.ui-home .acitve-bottom .vip-icon { flex-shrink: 0; }
body.ui-home .home-card-footer {
    gap: 10px 16px;
    flex-wrap: wrap;
}
body.ui-home .home-card-organizer { display: flex; align-items: center; flex: 1; min-width: 100px; }
body.ui-home .home-card-organizer .active-com { min-width: 0; }
body.ui-home .home-card-labels { display: flex; flex-shrink: 0; align-items: center; gap: 6px; margin-left: auto; }
body.ui-home .home-card-labels .fee,
body.ui-home .home-card-labels .tag {
    margin: 0;
    padding: 2px 7px;
    border-radius: 3px;
    font-size: 12px;
    line-height: 19px;
    color: #9e651f;
    background: #fff5e9;
}
body.ui-home .home-card-labels .fee.is-free { color: #397653; background: #eef8f2; }
body.ui-home .home-card-labels .tag { color: #5276a2; background: #eff5fc; }

/* 品牌活动使用三列竖向卡片，主办方悬在海报右上角，信息顺序保持稳定。 */
body.ui-home .home-section--brand {
    padding: 28px;
    border-radius: 6px;
    background: var(--home-surface);
}
body.ui-home .home-section--brand .win-acitve-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
body.ui-home .home-section--brand .win-acitve-list li {
    position: relative;
    display: flex;
    background: #fff;
    border-radius: 8px;
}
body.ui-home .home-section--brand .active-img {
    width: 100%;
    border-radius: 7px 7px 0 0;
}
body.ui-home .home-section--brand .acitve-top { display: flex; flex-direction: column; padding: 16px 16px 18px; }
body.ui-home .home-section--brand .title { font-size: 16px; line-height: 24px; margin-bottom: 10px; }
body.ui-home .home-section--brand .home-card-meta { display: block; }
body.ui-home .home-section--brand .home-card-meta .time,
body.ui-home .home-section--brand .home-card-meta .address { display: block; margin: 0 0 4px; }
body.ui-home .home-section--brand .home-card-labels { justify-content: flex-end; margin: 6px 0 0; }
body.ui-home .home-section--brand .ui-review { margin-top: 12px; padding-top: 11px; border-top: 1px solid var(--home-line); }
body.ui-home .home-card--brand > .home-card-organizer {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    flex: none;
    max-width: 140px;
    min-width: 0;
    height: 28px;
    padding: 0 8px 0 5px;
    border: 1px solid rgba(36, 39, 43, .08);
    border-radius: 14px;
    background: rgba(255, 255, 255, .94);
    box-sizing: border-box;
}
body.ui-home .home-card--brand > .home-card-organizer .logo {
    display: block;
    flex: 0 0 18px;
    width: 18px;
    height: 18px;
    overflow: hidden;
    border-radius: 50%;
}
body.ui-home .home-card--brand > .home-card-organizer .logo img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
body.ui-home .home-card--brand > .home-card-organizer .active-com {
    min-width: 0;
    max-width: 76px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
body.ui-home .home-card--brand > .home-card-organizer .vip-icon { display: flex; margin-left: 4px; }
body.ui-home .home-card--brand > .home-card-organizer .vip-icon img { width: 16px; }
body.ui-home .ui-review__item { margin-bottom: 7px; }
body.ui-home .ui-review__item a { color: var(--home-muted); font-size: 12px; }
body.ui-home .ui-review__item a:hover { color: var(--home-accent); }

/* 资讯沿用卡片底色与内边距，保留横向浏览。 */
body.ui-home .ui-carousel { width: 100%; }
body.ui-home .ui-carousel .swiper-container { padding: 0; margin: 0; }
body.ui-home .ui-carousel .win-acitve-list li { height: auto; }
body.ui-home .home-section--news .acitve-bottom { margin-top: 10px; height: auto; min-height: 40px; }
body.ui-home .active-key { flex-wrap: wrap; white-space: normal; font-size: 12px; color: var(--home-muted); }
body.ui-home .ui-carousel .ui-swiper-btn { border: 1px solid var(--home-line); }
body.ui-home .ui-carousel .ui-swiper-btn--prev { left: -20px; }
body.ui-home .ui-carousel .ui-swiper-btn--next { right: -20px; }
body.ui-home .ui-empty { width: 100%; margin: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
body.ui-home .ui-empty + .win-acitve-list:empty { display: none; }
body.ui-home.ui-activity-list .win-menu-wrap { padding-bottom: 24px; }
body.ui-home .activity-previous-title { margin-top: 24px; }
body.ui-home.ui-activity-list .win-pagination { margin-top: 32px; padding: 8px 0; }
body.ui-home .win-foot { margin-top: 64px; }
body.ui-home .win-foot .foot-wrap { width: calc(100% - 64px); max-width: 1200px; display: flex; gap: 48px; }
body.ui-home .win-foot .foot-wrap .bcode { float: none; flex: 0 0 130px; width: 130px; }
body.ui-home .win-foot .foot-wrap .bcode img { width: 130px; height: 130px; }
body.ui-home .win-foot .foot-wrap .brinfo { float: none; min-width: 0; width: auto; flex: 1; }
body.ui-home .win-foot .foot-nav { gap: 20px; }
body.ui-home .win-foot .foot-col { width: auto; }
body.ui-home .win-foot .foot-col dt,
body.ui-home .win-foot .foot-meta { border-color: rgba(255, 255, 255, .08); }
body.ui-home a:focus-visible,
body.ui-home input:focus-visible { outline: 2px solid var(--home-accent); outline-offset: 4px; }
body.ui-home .win-searh-hd input[type="text"]:focus-visible { outline: none; }
body.ui-home .win-searh-hd .sub:focus-visible { outline-offset: -2px; }
body.ui-home #moquu_wxin,
body.ui-home #moquu_top { border-color: var(--home-line); border-radius: 4px; box-shadow: none; }

/* 顶部账号栏只占自身宽度，避免透明区域遮住下方搜索入口。 */
body.ui-home .win-top {
    left: auto;
    right: max(32px, calc((100% - 1200px) / 2));
    width: max-content;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    body.ui-home *, body.ui-home *:before, body.ui-home *:after { transition: none !important; }
}
