@media (max-width: 760px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden !important;
  }

  body .header {
    margin: 8px auto 12px !important;
    padding: 0 10px !important;
    position: relative !important;
    top: auto !important;
  }

  body .header-inner {
    align-items: stretch !important;
    border-radius: 22px !important;
    flex-direction: column !important;
    gap: 10px !important;
    min-height: 0 !important;
    padding: 12px !important;
    width: calc(100vw - 20px) !important;
  }

  body .site-title {
    font-size: .92rem !important;
    max-width: 100% !important;
    white-space: normal !important;
  }

  body .site-nav {
    display: block !important;
    width: 100% !important;
  }

  body .main-menu {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    justify-content: flex-start !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    padding: 2px 2px 8px !important;
    scrollbar-width: none !important;
    width: 100% !important;
  }

  body .main-menu::-webkit-scrollbar {
    display: none !important;
  }

  body .main-menu > .menu-item {
    flex: 0 0 auto !important;
  }

  body .main-menu > .menu-item > a,
  body .main-menu > .menu-item > .popup-trigger {
    font-size: .82rem !important;
    min-height: 34px !important;
    padding: 0 11px !important;
    white-space: nowrap !important;
  }

  body .main-menu > .menu-item-has-children > .menu-child {
    left: 0 !important;
    max-width: calc(100vw - 32px) !important;
    min-width: 188px !important;
    position: absolute !important;
    transform: translateY(8px) !important;
  }

  body .main-menu > .menu-item-has-children:hover > .menu-child,
  body .main-menu > .menu-item-has-children:focus-within > .menu-child,
  body .main-menu > .menu-item-has-children > .menu-child:hover {
    transform: translateY(0) !important;
  }

  body .main {
    padding: 0 10px 28px !important;
  }

  body .main-inner {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
    width: calc(100vw - 20px) !important;
  }

  body .content-wrap,
  body .sidebar {
    max-width: none !important;
    min-width: 0 !important;
    width: 100% !important;
  }

  body .sidebar {
    display: block !important;
    margin: 0 0 12px !important;
    order: 1 !important;
  }

  body .content-wrap {
    order: 2 !important;
  }

  body .sidebar-inner,
  body .site-overview-wrap {
    position: static !important;
    width: 100% !important;
  }

  body .sidebar-profile-card,
  body .sidebar-card,
  body .links-of-blogroll,
  body .content.index,
  body .content-wrap > .content:not(.index),
  body:not(.index) .post-block,
  body .page .post-block,
  body .gallery-container,
  body .books-container,
  body .movies-container,
  body .diary-container,
  body .lab-container,
  body .category-all-page,
  body .tag-cloud,
  body .archive,
  body .album-wrapper {
    border-radius: 22px !important;
    box-sizing: border-box !important;
    max-width: 100% !important;
    overflow: hidden !important;
  }

  body .sidebar-profile-card {
    padding: 14px !important;
  }

  body .sidebar-profile-card .site-author-image {
    height: 72px !important;
    width: 72px !important;
  }

  body .sidebar-profile-card .site-description {
    font-size: .82rem !important;
    line-height: 1.45 !important;
    max-width: 100% !important;
  }

  body .sidebar-profile-card .links-of-author {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    max-width: none !important;
  }

  body .content.index .post-block.post-card-preview,
  body .content.index .post-block.post-card-preview:nth-of-type(even),
  body.index .post-card-preview,
  body.index .post-card-preview:nth-of-type(even) {
    align-items: stretch !important;
    display: grid !important;
    flex-direction: initial !important;
    grid-template-columns: minmax(118px, 38%) minmax(0, 1fr) !important;
    min-height: 164px !important;
    width: 100% !important;
  }

  body .content.index .post-block.post-card-preview .post-card-cover,
  body.index .post-card-preview .post-card-cover {
    align-self: stretch !important;
    aspect-ratio: auto !important;
    flex: initial !important;
    height: 100% !important;
    min-height: 164px !important;
    width: 100% !important;
  }

  body .content.index .post-block.post-card-preview .post-card-cover img,
  body.index .post-card-preview .post-card-cover img,
  body .post-body img,
  body .gallery-container img,
  body .album-card img {
    height: 100% !important;
    max-width: 100% !important;
    object-fit: cover !important;
    width: 100% !important;
  }

  body .content.index .post-block.post-card-preview .post-card-info {
    display: flex !important;
    flex-direction: column !important;
    min-width: 0 !important;
    padding: 14px 14px 12px !important;
  }

  body .content.index .post-card-preview .post-header {
    padding: 0 !important;
  }

  body .content.index .post-card-preview .post-title {
    font-size: 1rem !important;
    line-height: 1.32 !important;
    margin: 0 0 6px !important;
  }

  body .content.index .post-card-preview .post-meta {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 2px 8px !important;
    line-height: 1.4 !important;
    margin: 0 0 6px !important;
  }

  body .content.index .post-card-preview .post-meta-item {
    margin: 0 !important;
  }

  body .content.index .post-card-preview .post-body {
    color: #4e5b70 !important;
    flex: 1 1 auto !important;
    font-size: .84rem !important;
    line-height: 1.55 !important;
    max-height: none !important;
    overflow: visible !important;
    padding: 0 !important;
  }

  body .content.index .post-card-preview .post-body p {
    display: -webkit-box !important;
    margin: 0 !important;
    overflow: hidden !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 3 !important;
  }

  body .content.index .post-card-preview .post-body::after {
    display: none !important;
  }

  body .content.index .post-card-preview .post-button {
    margin-top: 8px !important;
  }

  body .content.index .post-card-preview .post-button .btn {
    font-size: .78rem !important;
    min-height: 30px !important;
    min-width: 82px !important;
    padding: 0 12px !important;
  }

  body .posts-expand .post-header,
  body .post-body,
  body .post-footer {
    padding-left: 16px !important;
    padding-right: 16px !important;
  }

  body .posts-expand .post-title {
    font-size: 1.18rem !important;
    line-height: 1.35 !important;
  }

  body .post-meta {
    font-size: .78rem !important;
  }

  body .post-body {
    font-size: .94rem !important;
    line-height: 1.72 !important;
  }

  body .books-container,
  body .movies-container,
  body .gallery-container,
  body .diary-container {
    padding: 14px !important;
  }

  body .books-container .books-grid,
  body .books-wrapper .books-grid,
  body .movies-container .movies-grid,
  body .movies-wrapper .movies-grid,
  body .album-grid,
  body .gallery-grid {
    display: grid !important;
    gap: 14px !important;
    grid-template-columns: 1fr !important;
    width: 100% !important;
  }

  body .books-container .book-card,
  body .books-wrapper .book-card,
  body .movies-container .movie-card,
  body .movies-wrapper .movie-card {
    box-sizing: border-box !important;
    max-width: 100% !important;
    min-width: 0 !important;
    width: 100% !important;
  }

  body .books-container .book-buttons,
  body .books-wrapper .book-buttons,
  body .movies-container .movie-buttons,
  body .movies-wrapper .movie-buttons {
    display: flex !important;
    gap: 8px !important;
    justify-content: center !important;
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  body .books-container .book-buttons .btn,
  body .books-wrapper .book-buttons .btn,
  body .movies-container .movie-buttons .btn,
  body .movies-wrapper .movie-buttons .btn {
    flex: 1 1 0 !important;
    max-width: 120px !important;
    min-width: 0 !important;
    width: auto !important;
  }

  html body .password-gate.hbe-container {
    margin: 10px auto 0 !important;
    padding: 18px !important;
    width: 100% !important;
  }

  html body .password-gate .hbe.hbe-content {
    width: 100% !important;
  }

  body #netease-player,
  body #sakana-widget-container,
  body .fireworks {
    display: none !important;
  }

  body .main-menu > .menu-item-has-children.is-touch-open > .menu-child {
    opacity: 1 !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
    visibility: visible !important;
  }
}

@media (max-width: 420px) {
  body .content.index .post-block.post-card-preview,
  body .content.index .post-block.post-card-preview:nth-of-type(even),
  body.index .post-card-preview,
  body.index .post-card-preview:nth-of-type(even) {
    grid-template-columns: 42% minmax(0, 1fr) !important;
    min-height: 150px !important;
  }

  body .content.index .post-block.post-card-preview .post-card-cover,
  body.index .post-card-preview .post-card-cover {
    min-height: 150px !important;
  }

  body .content.index .post-card-preview .post-card-info {
    padding: 12px !important;
  }

  body .content.index .post-card-preview .post-title {
    font-size: .94rem !important;
  }

  body .content.index .post-card-preview .post-meta {
    font-size: .72rem !important;
  }

  body .content.index .post-card-preview .post-body p {
    -webkit-line-clamp: 2 !important;
  }

  body .sidebar-profile-card .links-of-author {
    grid-template-columns: 1fr !important;
  }

  body .sidebar-popular-item a {
    grid-template-columns: 24px minmax(0, 1fr) 44px !important;
    padding: 0 10px !important;
  }

  body .sidebar-popular-item time {
    min-width: 44px !important;
    width: 44px !important;
  }
}

@media (max-width: 767px) {
  html,
  body {
    overflow-x: hidden !important;
  }

  body .sidebar,
  body .sidebar-inner,
  body .site-overview-wrap,
  body .site-author-widget,
  body .sidebar-panel,
  body .sidebar-toggle,
  body #sidebar-dimmer,
  body .post-toc-wrap,
  body .back-to-top {
    display: none !important;
  }

  body .header {
    padding: 0 10px !important;
  }

  body .header-inner {
    align-items: center !important;
    border-radius: 22px !important;
    flex-direction: row !important;
    gap: 0 !important;
    min-height: 0 !important;
    padding: 10px 12px !important;
    width: calc(100vw - 20px) !important;
  }

  body .site-brand-container,
  body .site-subtitle,
  body .site-nav-toggle,
  body .site-nav-right {
    display: none !important;
  }

  body .site-nav,
  body .main-menu {
    width: 100% !important;
  }

  body .main-menu {
    align-items: center !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 6px !important;
    justify-content: flex-start !important;
    overflow-x: auto !important;
    overflow-y: visible !important;
    padding: 2px 2px 4px !important;
    scrollbar-width: none !important;
  }

  body .main-menu::-webkit-scrollbar {
    display: none !important;
  }

  body .main-menu > .menu-item {
    flex: 0 0 auto !important;
  }

  body .main-menu > .menu-item > a,
  body .main-menu > .menu-item > .popup-trigger {
    min-height: 34px !important;
    padding: 0 11px !important;
    white-space: nowrap !important;
  }

  body .main,
  body .main-inner,
  body .content-wrap {
    width: 100% !important;
  }

  body .main-inner {
    display: block !important;
  }

  body .content-wrap {
    margin: 0 !important;
    padding: 0 !important;
  }

  body .content.index .post-block.post-card-preview,
  body .content.index .post-block.post-card-preview:nth-of-type(even),
  body.index .post-card-preview,
  body.index .post-card-preview:nth-of-type(even) {
    align-items: stretch !important;
    display: flex !important;
    flex-direction: row !important;
    gap: 0 !important;
    min-height: 150px !important;
    overflow: hidden !important;
    width: 100% !important;
  }

  body .content.index .post-block.post-card-preview .post-card-cover,
  body.index .post-card-preview .post-card-cover {
    flex: 0 0 40% !important;
    height: auto !important;
    min-height: 150px !important;
    width: 40% !important;
  }

  body .content.index .post-block.post-card-preview .post-card-cover img,
  body.index .post-card-preview .post-card-cover img {
    height: 100% !important;
    object-fit: cover !important;
    width: 100% !important;
  }

  body .content.index .post-block.post-card-preview .post-card-info {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    min-width: 0 !important;
    padding: 12px 12px 10px !important;
  }

  body .content.index .post-card-preview .post-header {
    padding: 0 !important;
  }

  body .content.index .post-card-preview .post-title {
    font-size: .98rem !important;
    line-height: 1.28 !important;
    margin: 0 0 6px !important;
  }

  body .content.index .post-card-preview .post-meta {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 2px 8px !important;
    line-height: 1.35 !important;
    margin: 0 0 6px !important;
  }

  body .content.index .post-card-preview .post-body {
    color: #4e5b70 !important;
    flex: 1 1 auto !important;
    font-size: .84rem !important;
    line-height: 1.5 !important;
    margin: 0 !important;
    max-height: none !important;
    overflow: hidden !important;
    padding: 0 !important;
  }

  body .content.index .post-card-preview .post-body p {
    display: -webkit-box !important;
    margin: 0 !important;
    overflow: hidden !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 3 !important;
  }

  body .content.index .post-card-preview .post-body::after {
    display: none !important;
  }

  body .content.index .post-card-preview .post-button {
    margin-top: 8px !important;
  }

  body .content.index .post-card-preview .post-button .btn {
    min-height: 30px !important;
    min-width: 82px !important;
    padding: 0 12px !important;
  }
}
