/* Offline mirror repairs for the cat detail page. All visual dependencies stay local. */
.offline_ad_slot {
  display: block;
  flex: 0 0 300px;
  height: 250px;
  overflow: hidden;
  width: 300px;
}

.offline_ad_slot img {
  display: block;
  height: 250px;
  width: 300px;
}

.latest_contribute_header .sub_thumbs {
  background-image: url('../../mirror-assets/downloaded/contribute_sub_thumb_bg.jpg') !important;
}

.global_conversions .box {
  min-height: 250px;
}

.global_conversions .offline_subscription_banner {
  display: block;
  flex: 0 0 300px;
  height: 250px;
  overflow: hidden;
  width: 300px;
}

.global_conversions .offline_subscription_banner img {
  display: block;
  height: 250px;
  width: 300px;
}

.global_conversions .title {
  background-image: url('../../mirror-assets/downloaded/logo_pet_symbol_blk-afe190fb38.svg');
}

/* Third-party widgets are replicated with local HTML/CSS to prevent remote requests. */
.local_share_btn {
  align-items: center;
  border-radius: 10px;
  box-sizing: border-box;
  color: #fff;
  display: inline-flex;
  font-size: 11px;
  font-weight: 700;
  height: 20px;
  justify-content: center;
  line-height: 20px;
  min-width: 80px;
  padding: 0 10px 0 8px;
  text-decoration: none !important;
  white-space: nowrap;
}

.local_share_btn:hover {
  color: #fff;
  opacity: .86;
}

.local_share_spacer {
  display: block;
  height: 20px;
  width: 157px;
}

.local_share_line {
  align-items: initial;
  background: #06c755;
  border-radius: 3px;
  box-sizing: content-box;
  color: #fff !important;
  display: inline-block;
  font-family: Meiryo, 'HiraKakuProN-W3', 'Arial Unicode MS', Arial, sans-serif, 'Apple SD Gothic Neo';
  font-size: 10px;
  font-weight: 600;
  letter-spacing: normal;
  justify-content: initial;
  line-height: 20px;
  min-width: 0;
  padding: 0 6px;
  vertical-align: top;
}

.local_share_line::before {
  background: url('../../mirror-assets/cats_miyazaki_pn550878/line_v3@3x.png') left center / 13px auto no-repeat;
  content: '';
  display: inline-block;
  height: 20px;
  margin: 0 4px 0 0;
  vertical-align: top;
  width: 13px;
}

/* === H5: cat contribute detail (PC untouched above 767px) === */
@media (max-width: 767px) {
  body.latest_layout_page,
  body.pet_page_detail {
    min-width: 0 !important;
  }

  body.latest_layout_page .page_content_wrap,
  body.latest_layout_page .page_content_container,
  body.latest_layout_page .content_inner_container,
  body.latest_layout_page .content_inner_container_04,
  body.latest_layout_page .content_inner_container_05,
  body.latest_layout_page .latest_contribute_header,
  body.latest_layout_page #contribute_detail_wrap {
    width: 100% !important;
    max-width: 100%;
    float: none !important;
  }

  /* —— Page title + sub menu —— */
  body.latest_layout_page .contribute_title_wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  body.latest_layout_page .contribute_title_wrap .title_main_02,
  body.latest_layout_page .contribute_title_wrap .title_left {
    float: none !important;
    width: 100% !important;
    line-height: 1.4 !important;
    font-size: 16px;
  }

  body.latest_layout_page .contribute_title_wrap .contribute_sub_menu_wrap,
  body.latest_layout_page .contribute_title_wrap .title_right {
    float: none !important;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
  }

  body.latest_layout_page .contribute_title_wrap .btn_link_type_01 {
    float: none !important;
    padding: 0 10px !important;
  }

  /* —— Attention banner —— */
  body.latest_layout_page .user_attention {
    height: auto !important;
  }

  body.latest_layout_page .user_attention ul {
    display: flex;
    flex-direction: column;
  }

  body.latest_layout_page .user_attention .left,
  body.latest_layout_page .user_attention .right {
    float: none !important;
    width: 100% !important;
    max-width: 100%;
    height: auto !important;
    line-height: 1.45 !important;
    box-sizing: border-box;
  }

  body.latest_layout_page .user_attention .left {
    padding: 6px 12px !important;
  }

  body.latest_layout_page .user_attention .right {
    padding: 8px 12px;
  }

  /* —— Header: title + publisher —— */
  body.latest_layout_page .latest_contribute_header .inner_top {
    padding: 16px 0 !important;
  }

  body.latest_layout_page .latest_contribute_header .info_title,
  body.latest_layout_page .latest_contribute_header .user_infos {
    float: none !important;
    width: 100% !important;
    max-width: 100%;
  }

  body.latest_layout_page .latest_contribute_header .info_title {
    margin-bottom: 12px;
  }

  body.latest_layout_page .latest_contribute_header .main_title {
    font-size: 18px !important;
    line-height: 1.35;
  }

  body.latest_layout_page .latest_contribute_header .info .date {
    display: block;
    margin: 4px 0 0 !important;
  }

  body.latest_layout_page .latest_contribute_header .bookmark_view_dates {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
  }

  body.latest_layout_page .latest_contribute_header .bookmark,
  body.latest_layout_page .latest_contribute_header .view,
  body.latest_layout_page .latest_contribute_header .count {
    float: none !important;
    margin: 0 !important;
  }

  body.latest_layout_page .latest_contribute_header .user_infos {
    margin-top: 0;
  }

  body.latest_layout_page .latest_contribute_header .user_icon {
    float: left;
  }

  body.latest_layout_page .latest_contribute_header .user_data {
    float: none !important;
    width: calc(100% - 72px) !important;
    margin-left: 72px;
  }

  body.latest_layout_page .latest_contribute_header .user_links {
    clear: both;
  }

  body.latest_layout_page .common_app_infos_min {
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 14px !important;
  }

  body.latest_layout_page .common_app_infos_min .main {
    font-size: 14px !important;
    line-height: 1.35;
  }

  /* —— Photo gallery —— */
  body.latest_layout_page .latest_contribute_header .inner_bottom {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  body.latest_layout_page .latest_contribute_header .thumbs {
    float: none !important;
    width: 100% !important;
    max-width: 100%;
    box-sizing: border-box;
    padding: 10px !important;
  }

  body.latest_layout_page .latest_contribute_header .main_thumb {
    float: none !important;
    width: 100% !important;
    max-width: 100%;
    height: auto !important;
    aspect-ratio: 1 / 1;
  }

  body.latest_layout_page .latest_contribute_header .main_thumb .img_container,
  body.latest_layout_page .latest_contribute_header .main_thumb a {
    display: block;
    width: 100%;
    height: 100%;
  }

  body.latest_layout_page .latest_contribute_header .main_thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  body.latest_layout_page .latest_contribute_header .sub_thumbs {
    float: none !important;
    display: flex !important;
    flex-wrap: wrap;
    gap: 8px;
    width: 100% !important;
    max-width: 100%;
    height: auto !important;
    margin-top: 10px;
    background-image: none !important;
    background-size: auto !important;
  }

  body.latest_layout_page .latest_contribute_header .sub_thumb {
    float: none !important;
    flex: 0 0 calc(33.333% - 6px);
    width: calc(33.333% - 6px) !important;
    height: auto !important;
    aspect-ratio: 1 / 1;
    margin: 0 !important;
  }

  body.latest_layout_page .latest_contribute_header .sub_thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  body.latest_layout_page .latest_contribute_header .rectangle,
  body.latest_layout_page .side_ads_wrap,
  body.latest_layout_page .side_ads_wrap_02,
  body.latest_layout_page [id^="PC_"],
  body.latest_layout_page .offline_ad_slot {
    display: none !important;
  }

  /* —— Sponsors —— */
  body.latest_layout_page .sponsor_introduction_content {
    flex-direction: column;
    align-items: flex-start !important;
    gap: 12px;
    padding: 14px 16px !important;
    margin: 14px 0 !important;
  }

  body.latest_layout_page .sponsor_introduction_content .info {
    width: 100% !important;
    max-width: 100%;
    font-size: 12px;
    line-height: 1.5;
  }

  body.latest_layout_page .sponsor_introduction_content .logo img {
    max-height: 40px;
    width: auto;
  }

  /* —— Detail main / sub columns —— */
  body.latest_layout_page #contribute_detail_wrap .contribute_detail_main,
  body.latest_layout_page #contribute_detail_wrap .contribute_detail_sub {
    float: none !important;
    width: 100% !important;
    max-width: 100%;
  }

  body.latest_layout_page #contribute_detail_wrap .contribute_detail_sub {
    margin-top: 16px;
  }

  /* Spec table: stack label + value as full-width rows */
  body.latest_layout_page #contribute_detail_wrap .contribute_datail_table {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    letter-spacing: normal !important;
  }

  body.latest_layout_page #contribute_detail_wrap .contribute_datail_table dt,
  body.latest_layout_page #contribute_detail_wrap .contribute_datail_table dd {
    display: block !important;
    float: none !important;
    box-sizing: border-box;
    letter-spacing: normal !important;
    vertical-align: top;
  }

  body.latest_layout_page #contribute_detail_wrap .contribute_datail_table dt {
    width: 38% !important;
    max-width: 38%;
    padding: 12px 10px 12px 12px !important;
    font-size: 12px;
    line-height: 1.4;
  }

  body.latest_layout_page #contribute_detail_wrap .contribute_datail_table dd {
    width: 62% !important;
    max-width: 62%;
    padding: 12px 12px 12px 10px !important;
    font-size: 13px;
    line-height: 1.45;
  }

  body.latest_layout_page #contribute_detail_wrap .contribute_datail_table dt br {
    display: none;
  }

  body.latest_layout_page #contribute_detail_wrap .contribute_datail_table .note {
    display: block;
    font-size: 10px;
    font-weight: 400;
    color: #999;
    margin-top: 2px;
  }

  /* Content blocks */
  body.latest_layout_page #contribute_detail_wrap .contribute_content_wrap {
    padding: 14px 12px !important;
  }

  body.latest_layout_page #contribute_detail_wrap .contribete_inner_list .list_title,
  body.latest_layout_page #contribute_detail_wrap .contribete_inner_list .info {
    float: none !important;
    width: 100% !important;
    max-width: 100%;
  }

  body.latest_layout_page #contribute_detail_wrap .contribete_inner_list .list_title {
    margin-bottom: 6px;
  }

  body.latest_layout_page #contribute_detail_wrap .contribete_inner_list .info {
    font-size: 13px;
    line-height: 1.6;
  }

  body.latest_layout_page .pet_agreement_box {
    padding: 12px !important;
  }

  body.latest_layout_page .pet_agreement_box .links,
  body.latest_layout_page .pet_agreement_box .pet_agreement_info {
    float: none !important;
    width: 100% !important;
  }

  body.latest_layout_page .pet_agreement_box .links {
    margin-bottom: 10px;
  }

  body.latest_layout_page .pet_agreement_box .link {
    width: 100% !important;
    max-width: 210px;
  }

  body.latest_layout_page .pet_agreement_box .link img {
    max-width: 100%;
    height: auto;
  }

  body.latest_layout_page .pet_detail_attention_link {
    display: block;
    width: 100%;
    box-sizing: border-box;
    white-space: normal !important;
    line-height: 1.4;
    padding: 10px 12px;
    height: auto !important;
  }

  body.latest_layout_page #contribute_detail_wrap .contribete_btn_img {
    margin: 0 auto;
  }

  body.latest_layout_page #contribute_detail_wrap .guide_link_wrap {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 12px;
  }

  body.latest_layout_page #contribute_detail_wrap .guide_link_wrap li {
    margin-left: 0 !important;
  }

  body.latest_layout_page .from_site_message_wrap .info_btn_wrap .info {
    float: none !important;
  }

  body.latest_layout_page .area_list_wrap dt,
  body.latest_layout_page .area_list_wrap dd {
    float: none !important;
    width: 100% !important;
    max-width: 100%;
  }

  body.latest_layout_page .area_list_wrap .inner li {
    float: none !important;
    display: inline-block;
    margin: 2px 8px 2px 0 !important;
  }

  body.latest_layout_page .contribute_sns_list_wrap {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
  }

  body.latest_layout_page .contribute_sns_list_wrap > li {
    float: none !important;
    margin: 0 !important;
  }

  body.latest_layout_page .contribute_sns_list_wrap > li[style*="width: 157px"] {
    width: auto !important;
    max-width: 100%;
    overflow: hidden;
  }

  body.latest_layout_page .page_sns_wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  body.latest_layout_page .page_sns_wrap li {
    float: none !important;
    margin-left: 0 !important;
  }

  body.latest_layout_page .local_share_spacer {
    width: 100%;
    max-width: 157px;
  }

  /* —— Recommended + sidebar —— */
  body.latest_layout_page .main_content_column,
  body.latest_layout_page .sub_content_column {
    float: none !important;
    width: 100% !important;
    max-width: 100%;
  }

  body.latest_layout_page .recommended_title_wrap .title_main_02 {
    font-size: 14px;
    line-height: 1.4;
  }

  body.latest_layout_page .other_contribute_result_wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
  }

  body.latest_layout_page .other_contribute_result_wrap .other_contribute_result,
  body.latest_layout_page .other_contribute_result_wrap .other_contribute_left {
    float: none !important;
    flex: 0 0 calc(33.333% - 7px);
    width: calc(33.333% - 7px) !important;
    margin: 0 !important;
    box-sizing: border-box;
  }

  body.latest_layout_page .other_contribute_result_wrap .img_container {
    width: 100%;
  }

  body.latest_layout_page .other_contribute_result_wrap img:not(.ui_img) {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
  }

  body.latest_layout_page .link_txt {
    margin-top: 12px;
  }

  /* Photos only — leave CSS sprites (.ui_img) alone */
  body.latest_layout_page .latest_contribute_header img:not(.ui_img),
  body.latest_layout_page #contribute_detail_wrap img:not(.ui_img),
  body.latest_layout_page .main_content_column img:not(.ui_img),
  body.latest_layout_page .content_inner_container > a > img {
    max-width: 100%;
    height: auto;
  }
}

@media (max-width: 380px) {
  body.latest_layout_page #contribute_detail_wrap .contribute_datail_table dt,
  body.latest_layout_page #contribute_detail_wrap .contribute_datail_table dd {
    width: 100% !important;
    max-width: 100%;
  }

  body.latest_layout_page #contribute_detail_wrap .contribute_datail_table dd {
    border-top: none !important;
    padding-top: 0 !important;
  }

  body.latest_layout_page .latest_contribute_header .sub_thumb {
    flex: 0 0 calc(50% - 4px);
    width: calc(50% - 4px) !important;
  }

  body.latest_layout_page .other_contribute_result_wrap .other_contribute_result,
  body.latest_layout_page .other_contribute_result_wrap .other_contribute_left {
    flex: 0 0 calc(50% - 5px);
    width: calc(50% - 5px) !important;
  }

  body.latest_layout_page .latest_contribute_header .main_title {
    font-size: 16px !important;
  }
}