/* Figma H5 — node 377:45527 / 1.0-首页 (375×2732) */
/* Canvas 375px; applies at ≤800px alongside desktop home.css */

@media (max-width: 800px) {
  .home-page {
    --home-canvas: 375px;
    --home-gutter: 16px;
    --home-column: 343px;
    --h5-header-h: 48px;
    --h5-panel: #171923;
    --h5-row: #0b0c18;
    --h5-overlay: rgba(0, 0, 0, 0.604);
  }

  .home-page .home-canvas {
    width: 100%;
    max-width: 100%;
  }

  /* —— Header 48px: hamburger | logo | TG + VIP —— */
  .home-page .home-site-header,
  .home-page .home-header-inner {
    height: var(--h5-header-h);
    min-height: var(--h5-header-h);
  }

  .home-page .home-header-inner {
    display: grid;
    grid-template-columns: 32px 1fr auto;
    align-items: center;
    gap: 0;
    padding: 0 var(--home-gutter);
    flex-wrap: nowrap;
  }

  .home-page .home-header-left {
    display: contents;
  }

  .home-page .home-hamburger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #d7d7d7;
    cursor: pointer;
    grid-column: 1;
  }

  .home-page .home-hamburger-lines {
    display: none;
  }

  .home-page .home-hamburger-icon {
    display: block;
    width: 16px;
    height: 16px;
    object-fit: contain;
  }

  .home-page .home-brand {
    grid-column: 2;
    justify-self: center;
    margin: 0;
  }

  .home-page .home-brand-logo {
    width: 78px;
    height: 27px;
  }

  .home-page .home-brand strong {
    font-size: 14px;
    font-weight: 500;
  }

  .home-page .home-main-nav {
    display: none !important;
  }

  .home-page .home-header-actions {
    grid-column: 3;
    margin-left: 0;
    gap: 16px;
  }

  .home-page .home-search-form { display: none !important; }
  .home-page .home-search-link--mobile { display: none !important; }

  .home-page .home-tg-label,
  .home-page .home-auth-label { display: none; }

  .home-page .home-tg-link,
  .home-page .home-auth-link {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 0;
    background: transparent;
    font-size: 0;
    line-height: 0;
    overflow: hidden;
  }

  .home-page .home-auth-link.is-logged-in {
    border: 0;
    background: transparent;
  }

  .home-page .home-tg-icon,
  .home-page .home-auth-icon {
    display: block;
    width: 32px;
    height: 32px;
    object-fit: contain;
  }

  .home-page .home-auth-link.is-logged-in .home-auth-icon {
    display: none;
  }

  .home-page .home-auth-link.is-logged-in .home-auth-avatar {
    display: block;
    width: 28px;
    height: 28px;
    font-size: 12px;
    line-height: 28px;
  }

  /* —— Trust bar H5 (Figma Tab5 150:21473 — 5 items, 14px, gap 18px) —— */
  .home-page .home-trust {
    display: flex;
    align-items: center;
    justify-content: center;
    height: auto;
    min-height: 20px;
    padding: 0 var(--home-gutter);
    margin: 0 auto 16px;
    gap: 18px;
    overflow: visible;
    flex-wrap: nowrap;
    width: 100%;
    max-width: var(--home-column);
    box-sizing: border-box;
    text-align: center;
  }

  .home-page .home-trust-item {
    flex: 0 0 auto;
    width: auto;
    min-width: 0;
    height: auto;
    padding: 0;
    font-size: 14px;
    line-height: 20px;
    white-space: nowrap;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .home-page .home-trust-item.is-ok {
    gap: 8px;
  }

  .home-page .home-trust-dot {
    width: 8px;
    height: 8px;
  }

  /* —— Ads grid: 4 columns on H5, all links shown —— */
  .home-page .home-ads {
    grid-template-columns: repeat(4, 78px);
    column-gap: 10px;
    row-gap: 12px;
    justify-content: space-between;
    width: 100%;
    max-width: var(--home-column);
    margin: 0 auto;
  }

  .home-page .home-ad-cell {
    width: 78px;
    height: 28px;
    min-width: 0;
    font-size: 12px;
    line-height: 28px;
    border-radius: 6px;
  }

  /* —— Featured banner 343×228 —— */
  .home-page .home-featured {
    display: flex !important;
    flex-direction: column;
    gap: 0;
    width: 100%;
    max-width: var(--home-column);
    margin: 0 auto;
  }

  .home-page .home-featured-side {
    display: none !important;
  }

  .home-page .home-featured-hero {
    flex: none;
    width: 100%;
    max-width: var(--home-column);
  }

  .home-page .home-featured-hero-media {
    height: 228px;
    border-radius: 6px;
    aspect-ratio: auto;
  }

  .home-page .home-featured-hero-overlay {
    padding: 24px 12px 12px;
  }

  .home-page .home-featured-hero-title {
    font-size: 14px;
    line-height: 20px;
    font-weight: 600;
  }

  .home-page .home-featured-meta {
    font-size: 10px;
    line-height: 14px;
  }

  .home-page .home-shell {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0 var(--home-gutter) 32px;
    border-radius: 0;
    background: transparent;
  }

  .home-page .hub-panel {
    max-width: 100%;
    margin: 0;
    padding: 12px;
    border-radius: 8px;
  }

  .home-page .home-shell-inner {
    gap: 16px;
    align-items: center;
    width: 100%;
  }

  .home-page .home-latest {
    width: 100%;
    max-width: var(--home-column);
  }

  .search-page .search-shell {
    max-width: 100%;
    margin: 0;
    padding: 0 var(--home-gutter) 32px;
    border-radius: 0;
    background: transparent;
  }

  .home-page .home-shell,
  .home-page .tip-center-main,
  .home-page .trending-main,
  .home-page .entertainment-main,
  .home-page .group-main,
  .home-page .profile-main,
  .home-page.article-page .article-shell,
  .home-page .sell-detail-main,
  .home-page .request-detail-main,
  .home-page .compilation-detail-page .cd-main,
  .home-page .ss-main,
  .home-page .sr-main,
  .home-page .bounty-claim-main {
    padding: 0 var(--home-gutter) 32px;
  }

  /* —— Section title —— */
  .home-page .home-section-head {
    width: 100%;
    max-width: var(--home-column);
    margin: 0 auto 10px;
    padding-left: 8px;
    box-sizing: border-box;
  }

  .home-page .home-section-head::before {
    width: 4px;
    height: 22px;
    top: 0;
    bottom: auto;
    border-radius: 100px;
    background: var(--home-accent);
  }

  .home-page .home-section-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 19px;
    color: var(--home-text);
  }

  .home-page .home-section-icon {
    width: 22px;
    height: 22px;
  }

  .home-page .home-feed-subtitle { display: none; }

  /* —— Feed card 343×116 —— */
  .home-page .home-feed {
    gap: 12px;
    width: 100%;
    max-width: var(--home-column);
    margin: 0 auto;
  }

  .home-page .home-feed-card {
    width: 100%;
    max-width: var(--home-column);
    height: auto;
    min-height: 116px;
    grid-template-columns: 164px minmax(0, 1fr);
    column-gap: 9px;
    row-gap: 0;
    padding: 8px;
    border-radius: 8px;
    align-items: center;
    box-sizing: border-box;
  }

  .home-page .home-collage {
    position: relative;
    width: 164px;
    height: 100px;
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: 74px 88px;
    column-gap: 2px;
    row-gap: 2px;
  }

  .home-page .home-collage-main {
    grid-column: 1;
    grid-row: 1 / span 2;
    width: 74px;
    height: 100px;
    border-radius: 3.84px 0 0 3.84px;
  }

  .home-page .home-collage-side {
    display: block;
    width: 88px;
    overflow: hidden;
    background: var(--home-placeholder);
  }

  .home-page .home-collage-side-top {
    grid-column: 2;
    grid-row: 1;
    height: 49px;
    margin-top: 0;
    border-radius: 0 3.84px 0 0;
  }

  .home-page .home-collage-side-bottom {
    grid-column: 2;
    grid-row: 2;
    height: 49px;
    margin-top: 0;
    border-radius: 0 0 3.84px 0;
  }

  .home-page .home-hot-badge:not(.home-hot-badge--inline) {
    top: 4px;
    left: 4px;
    width: auto;
    height: 18px;
    padding: 1px 6px;
    font-size: 10px;
    line-height: 16px;
    white-space: nowrap;
  }

  .home-page .home-feed-body {
    padding: 0;
    justify-content: flex-start;
    gap: 6px;
  }

  .home-page .home-feed-title {
    min-width: 0;
    max-width: 100%;
    font-size: 12px;
    line-height: 16px;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .home-page .home-feed-date {
    font-size: 10px;
    line-height: 14px;
  }

  .home-page .home-pill {
    min-width: 0;
    height: 18px;
    padding: 0 8px;
    font-size: 10px;
  }

  .home-page .home-feed-foot {
    gap: 4px 6px;
  }

  /* —— Pager —— */
  .home-page .home-pager {
    margin: 16px auto 0;
    gap: 40px;
    width: 100%;
    max-width: var(--home-column);
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
  }

  .home-page .home-pager-center {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 0 1 auto;
    justify-content: center;
  }

  .home-page .home-pager-status {
    font-size: 12px;
    line-height: 20px;
    order: 0;
    width: auto;
    text-align: center;
    margin-bottom: 0;
    color: rgba(255, 255, 255, 0.8);
  }

  .home-page .home-pager-circle {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
  }

  .home-page .home-pager-circle img {
    width: 24px;
    height: 24px;
  }

  .home-page .home-pager-input-wrap {
    width: 46px;
    min-height: 24px;
    padding: 6px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
  }

  .home-page .home-pager input[type="number"] {
    width: 100%;
    font-size: 9px;
    line-height: 11px;
    text-align: center;
  }

  .home-page .home-footer {
    width: 100%;
    margin-top: 16px;
    padding: 15px var(--home-gutter) 32px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    background: #100f0f;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    line-height: 20px;
    text-align: left;
    box-sizing: border-box;
  }

  .home-page .home-footer-inner {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
    max-width: var(--home-column);
    margin: 0 auto;
  }

  .home-page .home-footer-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 16px;
  }

  .home-page .home-footer-brand {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }

  .home-page .home-footer-brand .home-footer-logo img {
    display: block;
    width: 88px;
    height: auto;
  }

  .home-page .home-footer-col:nth-child(4) {
    grid-column: 1;
    grid-row: 3;
  }

  .home-page .home-footer-col h4 {
    margin: 0 0 10px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 18px;
    font-weight: 500;
    line-height: 20px;
  }

  .home-page .home-footer-col p {
    margin: 0;
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    line-height: 20px;
  }

  .home-page .home-footer-contact {
    margin-top: 0;
    font-size: 14px;
    line-height: 20px;
    color: rgba(255, 255, 255, 0.5);
  }

  .home-page .home-footer-contact a {
    color: inherit;
  }

  .home-page .home-footer-col ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
  }

  .home-page .home-footer-col:nth-child(2) ul {
    gap: 7px;
  }

  .home-page .home-footer-col:nth-child(3) ul,
  .home-page .home-footer-col:nth-child(4) ul {
    gap: 4px;
  }

  .home-page .home-footer-col li {
    padding: 2px 0;
  }

  .home-page .home-footer-col a {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    line-height: 20px;
  }

  .home-page .home-footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    margin-top: 0;
    padding-top: 6px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
    line-height: 16px;
    text-align: left;
  }

  /* —— Sidebar drawer —— */
  .home-page .home-drawer-root {
    position: fixed;
    inset: 0;
    z-index: 500;
    pointer-events: none;
  }

  .home-page .home-drawer-root.is-open {
    pointer-events: auto;
  }

  .home-page .home-drawer-backdrop {
    position: absolute;
    inset: 0;
    background: var(--h5-overlay);
    opacity: 0;
    transition: opacity 0.2s ease;
  }

  .home-page .home-drawer-root.is-open .home-drawer-backdrop {
    opacity: 1;
  }

  .home-page .home-drawer-panel {
    position: absolute;
    top: 0;
    left: 0;
    width: 301px;
    max-width: 80vw;
    height: 100%;
    background: var(--h5-panel);
    transform: translateX(-105%);
    transition: transform 0.24s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
  }

  .home-page .home-drawer-root.is-open .home-drawer-panel {
    transform: translateX(0);
  }

  .home-page .home-drawer-head {
    position: relative;
    flex: 0 0 var(--h5-header-h);
    height: var(--h5-header-h);
    min-height: var(--h5-header-h);
  }

  .home-page .home-drawer-close {
    position: absolute;
    left: 17px;
    top: 13px;
    width: 20px;
    height: 20px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    line-height: 0;
  }

  .home-page .home-drawer-close img {
    display: block;
    width: 20px;
    height: 20px;
  }

  .home-page .home-drawer-logo {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 78px;
    height: 27px;
  }

  .home-page .home-drawer-logo img {
    display: block;
    width: 78px;
    height: 27px;
    object-fit: contain;
  }

  .home-page .home-drawer-nav {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 0 10px 24px;
    -webkit-overflow-scrolling: touch;
  }

  .home-page .home-drawer-row {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 281px;
    height: 44px;
    margin: 0 0 6px;
    padding: 0;
    border: 0;
    border-radius: 8px;
    background: var(--h5-row);
    color: #fff;
    font-size: 14px;
    font-weight: 400;
    line-height: 1;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
    box-sizing: border-box;
  }

  .home-page .home-drawer-row-icon {
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    margin-left: 10px;
    object-fit: contain;
  }

  .home-page .home-drawer-row-label {
    margin-left: 6px;
    white-space: nowrap;
  }

  .home-page .home-drawer-toggle {
    padding-right: 22px;
  }

  .home-page .home-drawer-chevron {
    flex: 0 0 18px;
    width: 18px;
    height: 10px;
    margin-left: auto;
    transition: transform 0.2s ease;
  }

  .home-page .home-drawer-section.is-open .home-drawer-chevron {
    transform: rotate(180deg);
  }

  .home-page .home-drawer-section {
    margin-bottom: 0;
  }

  .home-page .home-drawer-sub {
    display: none;
    grid-template-columns: 135px 135px;
    column-gap: 11px;
    row-gap: 6px;
    width: 100%;
    max-width: 281px;
    margin: 0 0 6px;
  }

  .home-page .home-drawer-section.is-open .home-drawer-sub {
    display: grid;
  }

  .home-page .home-drawer-sub-item {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 135px;
    height: 44px;
    padding: 2px 4px;
    border-radius: 8px;
    background: var(--h5-row);
    color: #f2f2f2;
    font-size: 12px;
    line-height: 16px;
    text-align: center;
    text-decoration: none;
    box-sizing: border-box;
  }

  .home-page .home-drawer-row.is-active,
  .home-page .home-drawer-sub-item.is-active {
    color: var(--home-accent);
  }

  body.home-drawer-open {
    overflow: hidden;
  }
}

/* Desktop: hide hamburger + drawer chrome */
.home-page .home-hamburger,
.home-page .home-drawer-root {
  display: none;
}

@media (max-width: 800px) {
  .home-page .home-hamburger {
    display: inline-flex;
  }

  .home-page .home-drawer-root {
    display: block;
  }
}
