/* Theme fixes from QA report (2026-08-21) */

/* A-2: works background is patched in index.mlF4wlA0.css; keep as safety override */
.p-works {
  background-image: url("../../img/top/pc/img_movie_bg.png");
  background-position: 50%;
  background-repeat: no-repeat;
}

@media (width <=768px) {
  .p-works {
    background-image: url("../../img/top/sp/img_movie_bg.png");
  }
}

/* WEB LP: services section background */
.web-services {
  background: url("../../img/web/pc/img_services_bg.png") 50% / cover no-repeat;
}

@media (width <=768px) {
  .web-services {
    background-image: url("../../img/web/sp/img_services_bg.png");
  }
}

/* B-2: SP drawer must stay opaque */
.l-header .l-header__overlay {
  background: #fff;
}

.l-header .l-header__toggle-input:checked~.l-header__overlay {
  opacity: 1;
  background: #fff;
}

.l-header .l-header__backdrop {
  display: none;
}

/* PC drawer: 400px white panel + dimmed backdrop below */
@media (width >=769px) {
  .l-header .l-header__overlay {
    height: 520px;
    overflow-y: auto;
    transform: none;
  }

  .l-header .l-header__toggle-input:checked~.l-header__overlay {
    transform: none;
  }

  .l-header .l-header__backdrop {
    display: block;
    opacity: 0;
    visibility: hidden;
    z-index: 189;
    background: rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: opacity 0.4s, visibility 0.4s;
    position: fixed;
    top: 490px;
    right: 0;
    bottom: 0;
    left: 0;
  }

  .l-header .l-header__toggle-input:checked~.l-header__backdrop {
    opacity: 1;
    visibility: visible;
  }

  .l-header .l-header__nav {
    padding: 32px 40px 40px;
  }
}

/* B-3: keep 166社 on one line */
.p-data .p-data__stat .p-data__stat-value {
  white-space: nowrap;
}

.p-data .p-data__stat .p-data__stat-value>span:not(.p-data__stat-kanji) {
  white-space: nowrap;
}

/* B-7: hide unset external links until URLs are ready */
.p-works__btn[href="#"] {
  pointer-events: none;
  opacity: 0.35;
}

/* Drawer menu: PC (menu_pc_1.pdf) */
@media (width >=769px) {
  .l-header .l-header__nav .l-header__nav-list {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 32px;
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
  }

  .l-header .l-header__nav .l-header__nav-item--about {
    grid-column: 1;
    grid-row: 1;
  }

  .l-header .l-header__nav .l-header__nav-item--services {
    grid-column: 2;
    grid-row: 1;
  }

  .l-header .l-header__nav .l-header__nav-item--news {
    grid-column: 3;
    grid-row: 1;
    align-self: start;
  }

  .l-header .l-header__nav .l-header__nav-item--sns {
    grid-column: 3;
    grid-row: 2;
    align-self: start;
  }

  .l-header .l-header__nav .l-header__nav-item--contact {
    grid-column: 4;
    grid-row: 1 / span 2;
    max-width: none;
  }

  .l-header .l-header__nav .l-header__nav-item--group {
    min-width: 0;
    max-width: none;
  }

  .l-header .l-header__nav .l-header__nav-accordion {
    display: none;
  }

  .l-header .l-header__nav .l-header__nav-chevron {
    display: none;
  }

  .l-header .l-header__nav .l-header__nav-heading--toggle {
    display: block;
    pointer-events: none;
    cursor: default;
  }

  .l-header .l-header__nav .l-header__nav-item--accordion .l-header__nav-sublist {
    display: flex !important;
  }

  .l-header .l-header__nav .l-header__nav-heading,
  .l-header .l-header__nav .l-header__nav-heading--toggle {
    color: rgba(214, 50, 50, 1);
    border-left: none;
    margin-bottom: 0;
    padding-left: 0;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.04em;
  }

  .l-header .l-header__nav .l-header__nav-heading::after,
  .l-header .l-header__nav .l-header__nav-heading--toggle::after {
    content: "";
    background: rgba(214, 50, 50, 1);
    width: 100%;
    height: 1px;
    margin-top: 10px;
    margin-bottom: 18px;
    display: block;
  }

  .l-header .l-header__nav .l-header__nav-sublist {
    gap: 10px;
    padding-left: 0;
  }

  .l-header .l-header__nav .l-header__nav-sublist li a {
    color: #242424;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.6;
  }

  .l-header .l-header__nav .l-header__nav-sublist li a::before {
    content: "";
    width: 10px;
    height: 1px;
    background: #2b2b2b;
    margin-right: 12px;
    display: inline-block;
    transform: translateY(-4px);
  }

  .l-header .l-header__nav .l-header__nav-sns-text {
    color: #242424;
    margin-bottom: 14px;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.7;
  }

  .l-header .l-header__nav .l-header__nav-sns-text-sp {
    display: none;
  }

  .l-header .l-header__nav .l-header__nav-contact {
    max-width: none;
    margin-bottom: 0;
  }

  .l-header .l-header__nav .l-header__nav-contact-tel {
    margin-bottom: 18px;
    font-size: 34px;
  }

  .l-header .l-header__nav .l-header__nav-contact-btn {
    justify-content: space-between;
    width: 100%;
    height: 48px;
    padding: 0 16px;
    font-size: 14px;
  }

  .l-header .l-header__nav .l-header__nav-contact-btn i {
    font-style: normal;
    font-size: 18px;
    line-height: 1;
  }

  .l-header .l-header__nav .l-header__nav-contact-btn--primary {
    color: #fff;
    background: rgba(214, 50, 50, 1);
    border: none;
  }

  .l-header .l-header__nav .l-header__nav-sns {
    gap: 12px;
  }

  .l-header .l-header__nav .l-header__nav-sns img {
    width: 40px;
    height: 40px;
  }
}

/* Drawer menu: SP (menu_sp.pdf) */
@media (width <=768px) {
  .l-header .l-header__nav .l-header__nav-list {
    flex-direction: column;
    gap: 24px;
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
  }

  .l-header .l-header__nav .l-header__nav-item--group {
    width: 100%;
    min-width: 0;
  }

  .l-header .l-header__nav .l-header__nav-accordion {
    display: none;
  }

  .l-header .l-header__nav .l-header__nav-heading--toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    color: rgba(214, 50, 50, 1);
    border-bottom: 1px solid rgba(214, 50, 50, 1);
    margin-bottom: 0;
    padding-bottom: 12px;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
  }

  .l-header .l-header__nav .l-header__nav-heading--toggle::after {
    display: none;
  }

  .l-header .l-header__nav .l-header__nav-item--contact>.l-header__nav-heading,
  .l-header .l-header__nav .l-header__nav-item--sns>.l-header__nav-heading {
    display: block;
    width: 100%;
    color: rgba(214, 50, 50, 1);
    border-bottom: 1px solid rgba(214, 50, 50, 1);
    padding-bottom: 12px;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 0.04em;
  }

  .l-header .l-header__nav .l-header__nav-item--contact>.l-header__nav-heading::after,
  .l-header .l-header__nav .l-header__nav-item--sns>.l-header__nav-heading::after {
    display: none;
  }

  .l-header .l-header__nav .l-header__nav-chevron {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-right: 2px solid rgba(214, 50, 50, 1);
    border-bottom: 2px solid rgba(214, 50, 50, 1);
    margin-right: 4px;
    transform: rotate(-135deg);
    transition: transform 0.2s;
  }

  .l-header .l-header__nav .l-header__nav-accordion:not(:checked)+.l-header__nav-heading--toggle .l-header__nav-chevron {
    transform: rotate(45deg);
  }

  .l-header .l-header__nav .l-header__nav-accordion:not(:checked)~.l-header__nav-sublist {
    display: none;
  }

  .l-header .l-header__nav .l-header__nav-accordion:checked~.l-header__nav-sublist {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 16px;
    padding-left: 0;
  }

  .l-header .l-header__nav .l-header__nav-sublist li a {
    color: #242424;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.6;
  }

  .l-header .l-header__nav .l-header__nav-sublist li a::before {
    content: "— ";
  }

  .l-header .l-header__nav .l-header__nav-contact {
    margin-top: 16px;
  }

  .l-header .l-header__nav .l-header__nav-contact-tel {
    margin-bottom: 16px;
    font-size: 28px;
  }

  .l-header .l-header__nav .l-header__nav-contact-btn {
    justify-content: space-between;
    width: 100%;
    height: 52px;
    padding: 0 16px;
    font-size: 15px;
  }

  .l-header .l-header__nav .l-header__nav-contact-btn--primary {
    color: #fff;
    background: rgba(214, 50, 50, 1);
    border: none;
  }

  .l-header .l-header__nav .l-header__nav-contact-btn i {
    font-style: normal;
    font-size: 18px;
    line-height: 1;
  }

  .l-header .l-header__nav .l-header__nav-sns-text {
    color: #242424;
    margin-top: 16px;
    margin-bottom: 14px;
    font-size: 15px;
    font-weight: 500;
    line-height: 1.7;
  }

  .l-header .l-header__nav .l-header__nav-sns-text-pc {
    display: none;
  }

  .l-header .l-header__nav .l-header__nav-sns {
    gap: 16px;
  }

  .l-header .l-header__nav .l-header__nav-sns img {
    width: 40px;
    height: 40px;
  }
}

/* A-5: cover baked-in "第1話" on sample manga thumbnails */
.p-manga-archive__thumb.is-sample::before {
  content: "";
  z-index: 1;
  background: #fff;
  width: 96px;
  height: 34px;
  position: absolute;
  bottom: 0;
  left: 0;
}

.p-manga-archive__thumb .p-manga-archive__tag {
  z-index: 2;
}

.p-manga .p-manga__item a {
  position: relative;
}

.p-manga .p-manga__no {
  z-index: 2;
  position: absolute;
  bottom: 0;
  left: 0;
}

/* 事業カード: 矢印位置 + ホバー（PDF準拠） */
.p-business .p-business__card {
  transition: opacity 0.2s;
}

.p-business .p-business__card:hover {
  opacity: 1;
}

.p-business .p-business__arrow {
  z-index: 3;
  color: #fff;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  font-size: 18px;
  line-height: 1;
  display: flex;
  position: absolute;
  top: auto;
  right: 28px;
  bottom: 28px;
  transform: none;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.p-business .p-business__card:hover .p-business__arrow {
  background: #fff;
  border-color: #fff;
  color: #028b6c;
}

@media (width <=768px) {
  .p-business .p-business__arrow {
    right: 16px;
    bottom: 20px;
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
}

/* Hero tiles: fluid scale below 1400px to preserve 2x2 layout */
@media (769px <=width <=1600px) {
  .p-hero {
    .p-hero__inner {
      padding-top: clamp(48px, 5.714vw, 80px);
      padding-right: clamp(16px, 2.857vw, 40px);
      padding-left: clamp(32px, 10vw, 10%);
    }

    .p-hero__copy {
      max-width: clamp(320px, 40vw, 560px);
    }

    .p-hero__title {
      margin-bottom: clamp(16px, 1.714vw, 24px);

      img {
        max-width: clamp(260px, 31.429vw, 440px);
      }
    }

    .p-hero__text {
      margin-bottom: clamp(16px, 1.571vw, 22px);
      font-size: clamp(13px, 1.286vw, 18px);
      line-height: 1.95;
    }

    .p-hero__banner {
      max-width: clamp(320px, 40vw, 560px);

      img {
        max-width: clamp(300px, 39.357vw, 551px);
      }
    }

    .p-hero__tiles {
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: clamp(6px, 0.571vw, 8px);
      width: clamp(300px, 38vw, 720px);
      max-width: 720px;
      margin-top: clamp(12px, 1.429vw, 20px);
    }

    .p-hero__tile {
      min-width: 0;

      a {
        gap: clamp(6px, 0.714vw, 10px);
        height: auto;
        min-height: clamp(60px, 6.286vw, 88px);
        padding-left: clamp(10px, 1.143vw, 16px);
      }

      .p-hero__tile-text {
        font-size: clamp(11px, 1.071vw, 15px);
        line-height: 1.45;
      }

      .p-hero__tile-icon {
        width: clamp(56px, 6.286vw, 88px);
        height: clamp(56px, 6.286vw, 88px);
      }

      .p-hero__tile-arrow {
        width: clamp(16px, 1.571vw, 22px);
        height: clamp(16px, 1.571vw, 22px);
        margin-left: clamp(4px, 0.571vw, 8px);
      }
    }
  }
}

/* Character cards: fluid avatar / typography by viewport */
.p-character {
  .p-character__cards {
    gap: clamp(12px, 1.143vw, 16px);
  }

  .p-character__card {
    gap: clamp(12px, 1.143vw, 16px);
    padding: clamp(16px, 1.429vw, 20px);
  }

  .p-character__avatar {
    width: clamp(72px, 7.857vw, 110px);
    height: clamp(72px, 7.857vw, 110px);
  }

  .p-character__name {
    margin-bottom: clamp(4px, 0.429vw, 6px);
    font-size: clamp(16px, 1.714vw, 24px);
  }

  .p-character__desc {
    font-size: clamp(12px, 1.143vw, 16px);
    line-height: 1.75;
  }

  .p-character__illust-col {
    flex-shrink: 0;
    min-width: 0;
  }

  .p-character__illust-col>picture:not(.p-character__brush) {
    flex-shrink: 0;
  }

  .p-character__brush {
    width: clamp(240px, 34.286vw, 480px);
    max-width: 100%;
  }

  .p-character__brush img {
    object-fit: contain;
  }

  .p-character__illust {
    width: auto;
    max-width: none;
    height: clamp(180px, 25.714vw, 360px);
    object-fit: contain;
    flex-shrink: 0;
  }

  .p-character__illust--kazedono {
    margin-right: clamp(-12px, -1.429vw, -20px);
  }

  .p-character__illust--nia {
    height: clamp(150px, 21.429vw, 300px);
    margin-left: clamp(-12px, -1.429vw, -20px);
  }

  @media (769px <=width <=1400px) {
    .p-character__body {
      grid-template-columns: minmax(0, 1fr) minmax(0, clamp(280px, 34.286vw, 480px));
      gap: clamp(16px, 1.714vw, 24px) clamp(20px, 2.857vw, 40px);
    }

    .p-character__illust-col {
      justify-content: center;
      min-height: clamp(200px, 27.143vw, 380px);
    }
  }
}