@font-face {
  font-family: "EFD Footer Latin";
  src: url("fonts/LuckiestGuy.woff2") format("woff2");
  font-display: swap;
}

@font-face {
  font-family: "EFD Footer JP";
  src: url("fonts/MochiyPopPOne.woff2") format("woff2");
  font-display: swap;
}

.efd-shared-desktop-footer {
  display: none;
}

/* Plugin pages provide their own footer; suppress the duplicated theme footer. */
.eal-site-footer {
  display: none !important;
}

@media (min-width: 701px) {
  .efd-archive-footer,
  .efd-person-disclosure,
  .efd-manga-footer,
  .efd-item-footer,
  .efd-legal-footer,
  .efd-concierge-footer,
  .mcp-footer,
  body.efd-kantei-guide-route > footer {
    display: none !important;
  }

  .efd-shared-desktop-footer {
    position: relative;
    z-index: 2;
    isolation: isolate;
    display: block;
    box-sizing: border-box;
    width: 100%;
    margin-top: 72px;
    padding: 42px 28px 50px;
    overflow: hidden;
    color: #17131c;
    background: #eba7c7;
    letter-spacing: 0;
  }

  .efd-shared-desktop-footer::after {
    position: absolute;
    right: -4%;
    bottom: -38px;
    left: -4%;
    z-index: -1;
    height: 92px;
    background: #fff8fb;
    content: "";
    transform: rotate(5deg);
    transform-origin: 50% 50%;
  }

  .efd-shared-footer-card {
    position: relative;
    box-sizing: border-box;
    width: min(1120px, calc(100% - 28px));
    margin: 0 auto;
    padding: 38px 38px 24px;
    overflow: hidden;
    border: 3px solid #211d25;
    border-radius: 28px;
    background: #fff;
    box-shadow: 10px 10px 0 #8a4dff;
  }

  .efd-shared-footer-card::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 8px;
    background: linear-gradient(90deg, #4dc7d5 0 25%, #d4ff00 25% 50%, #ff2f86 50% 75%, #8a4dff 75% 100%);
    content: "";
  }

  .efd-shared-footer-logo {
    display: block;
    width: min(430px, 100%);
    margin: 0 auto 30px;
  }

  .efd-shared-footer-logo img {
    display: block;
    width: 100%;
    height: auto;
  }

  .efd-shared-footer-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 36px;
    padding-bottom: 28px;
  }

  .efd-shared-footer-grid nav {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 9px;
  }

  .efd-shared-footer-heading {
    margin: 0 0 6px;
    color: #1c1820;
    font: 400 20px/1 "EFD Footer Latin", "Arial Black", sans-serif;
    white-space: nowrap;
  }

  .efd-shared-footer-grid a {
    color: #17131c;
    font: 700 12px/1.45 "EFD Footer JP", "Yu Gothic", sans-serif;
    text-decoration: none;
  }

  .efd-shared-footer-grid a:hover,
  .efd-shared-footer-grid a:focus-visible {
    color: #e80066;
    text-decoration: underline;
    text-underline-offset: 3px;
  }

  .efd-shared-footer-lower {
    display: grid;
    grid-template-columns: auto auto minmax(290px, 1fr);
    align-items: center;
    gap: 24px;
    padding: 22px 0;
    border-top: 1px solid #ddd7df;
    border-bottom: 1px solid #ddd7df;
  }

  .efd-shared-footer-brand {
    display: flex;
    flex-direction: column;
    color: #17131c;
    text-decoration: none;
    white-space: nowrap;
  }

  .efd-shared-footer-brand b {
    font: 400 23px/1 "EFD Footer JP", "Yu Gothic", sans-serif;
  }

  .efd-shared-footer-brand span {
    margin-top: 6px;
    color: #ff2f86;
    font: 400 20px/1 "EFD Footer Latin", "Arial Black", sans-serif;
  }

  .efd-shared-footer-actions {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .efd-shared-footer-actions a {
    display: inline-flex;
    min-height: 42px;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border: 2px solid #211d25;
    border-radius: 999px;
    color: #17131c;
    background: #fff;
    font: 700 11px/1.2 "EFD Footer JP", "Yu Gothic", sans-serif;
    text-decoration: none;
    white-space: nowrap;
  }

  .efd-shared-footer-actions a.is-concierge {
    color: #fff;
    background: #7d00e7;
    box-shadow: 0 4px 0 #211d25;
  }

  .efd-shared-footer-actions a:hover,
  .efd-shared-footer-actions a:focus-visible {
    transform: translateY(-2px);
  }

  .efd-shared-footer-lower .efd-service-credits {
    display: flex;
    min-width: 0;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
  }

  .efd-shared-footer-lower .efd-service-credits a,
  .efd-shared-footer-lower .efd-service-credits img {
    display: block;
  }

  .efd-shared-footer-lower .efd-service-credits img {
    width: auto;
    max-width: 112px;
    height: auto;
    max-height: 18px;
  }

  .efd-shared-footer-disclosure {
    margin: 18px 0 0;
    color: #6f6872;
    font: 700 10px/1.7 "EFD Footer JP", "Yu Gothic", sans-serif;
    text-align: center;
  }

  .efd-shared-desktop-footer.is-text-mode {
    color: #a4ffad;
    background: #000;
  }

  .efd-shared-desktop-footer.is-text-mode::after {
    background: #001408;
  }

  .efd-shared-desktop-footer.is-text-mode .efd-shared-footer-card {
    border-color: #2b6c3b;
    background: #001008;
    box-shadow: 10px 10px 0 #123f22;
  }

  .efd-shared-desktop-footer.is-text-mode .efd-shared-footer-card::before {
    background: #67d977;
  }

  .efd-shared-desktop-footer.is-text-mode .efd-shared-footer-logo {
    filter: grayscale(1) sepia(1) hue-rotate(65deg) saturate(5);
  }

  .efd-shared-desktop-footer.is-text-mode .efd-shared-footer-heading,
  .efd-shared-desktop-footer.is-text-mode .efd-shared-footer-grid a,
  .efd-shared-desktop-footer.is-text-mode .efd-shared-footer-brand,
  .efd-shared-desktop-footer.is-text-mode .efd-shared-footer-disclosure {
    color: #a4ffad;
  }

  .efd-shared-desktop-footer.is-text-mode .efd-shared-footer-brand span {
    color: #67d977;
  }

  .efd-shared-desktop-footer.is-text-mode .efd-shared-footer-lower {
    border-color: #24572f;
  }

  .efd-shared-desktop-footer.is-text-mode .efd-shared-footer-actions a {
    border-color: #67d977;
    color: #a4ffad;
    background: #001008;
  }

  .efd-shared-desktop-footer.is-text-mode .efd-shared-footer-actions a.is-concierge {
    color: #001008;
    background: #67d977;
    box-shadow: 0 4px 0 #24572f;
  }
}

@media (min-width: 701px) and (max-width: 940px) {
  .efd-shared-footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .efd-shared-footer-lower {
    grid-template-columns: 1fr 1fr;
  }

  .efd-shared-footer-lower .efd-service-credits {
    grid-column: 1 / -1;
    justify-content: center;
  }
}
