/* ========================================
   Layout
======================================== */

.l-header__support-label,
.l-header__child-list .l-header__support-sub-link {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
}

.l-header__support-label b,
.l-header__support-sub-link b {
  font: inherit;
}

.l-header__support-label small,
.l-header__support-sub-link small {
  font-size: 0.76em;
  font-weight: 500;
  letter-spacing: 0.03em;
  line-height: 1.35;
  opacity: 0.72;
}

@media (min-width: 1024px) {
  .l-site {
    padding-left: 315px;
  }

  .l-header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;

    width: 315px;
    height: 100vh;

    background: #00063e;
    color: #fff;
  }

  .admin-bar .l-header {
    top: 32px;
    height: calc(100vh - 32px);
  }

  .l-header__inner {
    width: 243px;
    height: 100%;

    margin-inline: auto;
    padding-block: 32px;

    display: flex;
    flex-direction: column;
  }

  .l-header__logo {
    width: 210px;
    margin: 0 auto 50px;

    flex-shrink: 0;
  }

  .l-header__logo img {
    width: 100%;
    height: auto;
  }

  .l-header__nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;

    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .l-header__nav::-webkit-scrollbar {
    display: none;
  }

  .l-header__nav-list {
    display: grid;
    gap: 40px;
  }

  .l-header__nav-item > a,
  .l-header__nav-button {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;

    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
    text-align: left;
  }

  /* キャラクター一覧：親リンク＋アコーディオンボタン */
  .l-header__nav-parent {
    display: flex;
    align-items: center;
    width: 100%;
  }

  .l-header__nav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    flex: 1;

    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.5;
    text-align: left;
    text-decoration: none;
  }

  .l-header__nav-link > img:first-child {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex: 0 0 auto;
  }

  .l-header__nav-link span {
    flex: 1;
    min-width: 0;
  }

  .l-header__nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;

    width: 28px;
    height: 28px;
    margin-left: 6px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
  }

  .l-header__nav-item > a > img:first-child,
  .l-header__nav-button > img:first-child {
    width: 20px;
    height: 20px;
    object-fit: contain;
    flex: 0 0 auto;
  }

  .l-header__nav-item span,
  .l-header__nav-button span {
    flex: 1;
    font: inherit;
    line-height: inherit;
  }

  .l-header__arrow,
  .l-header__external {
    width: 14px;
    height: 14px;
    object-fit: contain;
    flex: 0 0 auto;
  }

  .l-header__child-list {
    height: 0;
    margin-top: 0;
    padding-left: 38px;
    overflow: hidden;

    display: grid;
    gap: 18px;

    opacity: 0;

    transition:
      height 0.25s ease,
      margin-top 0.25s ease,
      opacity 0.2s ease;
  }

  .l-header__nav-item.is-open > .l-header__child-list {
    margin-top: 20px;
    opacity: 1;
  }

  /* 初期表示時だけアニメーション無効 */
  body:not(.is-ready) .l-header__child-list {
    transition: none;
  }

  .l-header__child-list a {
    display: block;
    color: #fff;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.5;
  }

  .l-header__arrow {
    transition: rotate 0.2s ease;
  }

  .l-header__nav-item.is-open > .l-header__nav-button > .l-header__arrow {
    rotate: 180deg;
  }

  .l-header__sns {
    display: flex;
    gap: 24px;

    margin-top: 40px;
    padding-left: 38px;
  }

  .l-header__sns a {
    display: block;
    width: 24px;
    height: 24px;
  }

  .l-header__sns img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }
}

/* ========================================
   Main
======================================== */

.l-main {
  min-height: 100vh;
}

@media (max-width: 1023px) {
  .l-main {
    margin-top: 64px;
  }
}

/* ========================================
   Footer
======================================== */

.l-footer {
  margin-left: 315px;
  padding: 176px 20px 170px;
  background: #00246f;
  color: #fff;
  text-align: center;
}

.l-footer__inner {
  width: min(100%, 750px);
  margin-inline: auto;
}

.l-footer__logo {
  width: 110px;
  margin: 0 auto 38px;
}

.l-footer__logo img {
  width: 100%;
  height: auto;
}

.l-footer__store-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  width: 315px;
  min-height: 45px;

  margin-bottom: 48px;

  border-radius: 4px;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
}

.l-footer__store-button img:first-child {
  width: 20px;
  height: 20px;
}

.l-footer__store-button img:last-child {
  width: 14px;
  height: 14px;
}

.l-footer__company {
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.6;
}

.l-footer__notice {
  margin: 0 0 28px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.8;
}

.l-footer__support {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;

  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.l-footer__support li {
  margin: 0;
}

.l-footer__support a {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
  text-decoration: underline;
}

.l-footer__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 24px;
  margin: 0 0 24px;
  padding: 18px 0 0;
  border-top: 1px solid rgba(255, 255, 255, 0.32);
  list-style: none;
}

.l-footer__legal li {
  margin: 0;
}

.l-footer__legal a {
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.6;
  text-decoration: underline;
}

.l-footer__copy {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.8;
}

/* ========================================
   404
======================================== */
.p-not-found {
  display: grid;
  min-height: 760px;
  padding: 120px 40px;
  background: #f4f4f4;
  place-items: center;
}

.p-not-found__inner {
  width: min(100%, 820px);
  padding: 72px 56px;
  border: 1px solid #d3d3d3;
  background: #fff;
  color: #00246f;
  text-align: center;
}

.p-not-found__code {
  margin: 0;
  color: #ef3b30;
  font-size: clamp(88px, 10vw, 150px);
  font-weight: 700;
  line-height: 0.85;
  letter-spacing: -0.04em;
}

.p-not-found__label {
  margin: 24px 0 0;
  color: #ef3b30;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.p-not-found__title {
  margin: 18px 0 0;
  font-size: 30px;
  line-height: 1.5;
}

.p-not-found__text {
  margin: 22px 0 0;
  color: #111;
  font-size: 15px;
  font-weight: 500;
  line-height: 2;
}

.p-not-found__primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  min-height: 56px;
  margin-top: 36px;
  padding: 12px 28px;
  border-radius: 4px;
  background: #00246f;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  transition: opacity 0.25s ease;
}

.p-not-found__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 26px;
  margin-top: 28px;
}

.p-not-found__nav a {
  color: #00246f;
  font-size: 13px;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
  transition: opacity 0.25s ease;
}

@media (hover: hover) and (pointer: fine) {
  .p-not-found__primary:hover,
  .p-not-found__nav a:hover {
    opacity: 0.65;
  }
}

@media (max-width: 1023px) {
  .l-footer {
    padding: 80px 20px;
  }

  .l-footer__store-button {
    width: min(100%, 315px);
  }

  .p-not-found {
    min-height: 620px;
    padding: 110px 20px 64px;
  }

  .p-not-found__inner {
    padding: 48px 22px;
  }

  .p-not-found__code {
    font-size: 78px;
  }

  .p-not-found__label {
    margin-top: 18px;
    font-size: 10px;
  }

  .p-not-found__title {
    margin-top: 14px;
    font-size: 21px;
  }

  .p-not-found__text {
    font-size: 13px;
    line-height: 1.9;
  }

  .p-not-found__text br {
    display: none;
  }

  .p-not-found__primary {
    width: 100%;
    min-width: 0;
    margin-top: 28px;
  }

  .p-not-found__nav {
    gap: 10px 18px;
    margin-top: 24px;
  }

  .p-not-found__nav a {
    font-size: 11px;
  }
}

/* ========================================
   SP / Header
======================================== */

@media (max-width: 1023px) {
  .l-site {
    padding-left: 0;
  }

  .l-header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    width: 100%;
    height: 64px;
    background: #00063e;
  }

  .admin-bar .l-header {
    top: 46px;
  }

  .l-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;

    height: 100%;
    padding: 0 28px;
  }

  .l-header__logo {
    width: 144px;
    margin: 0;
  }

  .l-header__logo img {
    width: 100%;
    height: auto;
  }

  .l-header__menu-button {
    position: relative;
    z-index: 1100;

    width: 24px;
    height: 16px;

    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
  }

  .l-header__menu-button span {
    position: absolute;
    left: 0;

    display: block;
    width: 28px;
    height: 2px;

    border-radius: 999px;
    background: #fff;
    transform-origin: center;

    transition:
      top 0.25s ease,
      transform 0.25s ease,
      opacity 0.25s ease;
  }

  .l-header__menu-button span:nth-child(1) {
    top: 0;
  }

  .l-header__menu-button span:nth-child(2) {
    top: 7px;
  }

  .l-header__menu-button span:nth-child(3) {
    top: 14px;
  }

  body.is-menu-open .l-header__menu-button span:nth-child(1) {
    top: 7px;
    transform: rotate(34deg);
  }

  body.is-menu-open .l-header__menu-button span:nth-child(2) {
    opacity: 0;
  }

  body.is-menu-open .l-header__menu-button span:nth-child(3) {
    top: 7px;
    transform: rotate(-34deg);
  }

  /* ========================================
   SP / Header Menu
======================================== */

  .l-header__nav {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1050;

    width: min(80vw, 300px);
    height: 100dvh;
    padding: 46px 25px;

    background: #00063e;
    box-shadow: -8px 0 20px rgba(0, 0, 0, 0.25);

    translate: 100% 0;
    transition: translate 0.3s ease;

    display: flex;
    flex-direction: column;

    overflow: hidden;
    /* iOS text autosizing guard for accordion labels. */
    -webkit-text-size-adjust: none;
    text-size-adjust: none;
  }

  body.is-menu-open .l-header__nav {
    translate: 0 0;
  }

  .l-header__nav-logo {
    flex: 0 0 auto;

    width: 183px;
    margin: 0 0 36px;
  }

  .l-header__nav-logo a,
  .l-header__nav-logo img {
    display: block;
    width: 100%;
    height: auto;
  }

  .l-header__nav-scroll {
    flex: 1 1 auto;
    min-height: 0;

    overflow-y: auto;
    overflow-x: hidden;

    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  .l-header__nav-scroll::-webkit-scrollbar {
    display: none;
  }

  .l-header__nav-list {
    display: grid;
    align-content: start;
    gap: 28px;
  }

  .l-header__nav-item > a,
  .l-header__nav-button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;

    color: #fff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
    text-align: left;
    text-decoration: none;
  }

  /* キャラクター一覧：親リンク＋アコーディオンボタン */
  .l-header__nav-parent {
    display: flex;
    align-items: center;
    width: 100%;
  }

  .l-header__nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    flex: 1;

    color: #fff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.5;
    text-align: left;
    text-decoration: none;
  }

  .l-header__nav-link > img:first-child {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    object-fit: contain;
  }

  .l-header__nav-link span {
    flex: 1;
    min-width: 0;
  }

  .l-header__nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;

    width: 28px;
    height: 28px;
    margin-left: 6px;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    cursor: pointer;
  }

  .l-header__nav-item > a > img:first-child,
  .l-header__nav-button > img:first-child {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    object-fit: contain;
  }

  .l-header__nav-item span,
  .l-header__nav-button span {
    flex: 1;
    font: inherit;
    line-height: inherit;
    font-size: 16px !important;
  }

  .l-header__nav-item--collection > .l-header__nav-button > span {
    font-size: 14px !important;
  }

  .l-header__arrow,
  .l-header__external {
    flex: 0 0 auto;
    width: 13px;
    height: 13px;
    object-fit: contain;
  }

  .l-header__child-list {
    height: 0;
    margin-top: 0;
    padding-left: 28px;

    overflow: hidden;

    display: grid;
    gap: 13px;

    opacity: 0;

    transition:
      height 0.25s ease,
      margin-top 0.25s ease,
      opacity 0.2s ease;
  }

  .l-header__nav-item.is-open > .l-header__child-list {
    margin-top: 16px;
    opacity: 1;
  }

  body:not(.is-ready) .l-header__child-list {
    transition: none;
  }

  .l-header__child-list a {
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.6;
    text-decoration: none;
  }

  .l-header__arrow {
    transition: transform 0.25s ease;
  }

  .l-header__nav-item.is-open > .l-header__nav-button > .l-header__arrow {
    transform: rotate(180deg);
  }

  .l-header__sns {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;

    margin-top: 44px;
    padding-left: 0;
  }

  .l-header__sns a {
    display: block;
    width: 24px;
    height: 24px;
  }

  .l-header__sns img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .l-header__overlay {
    position: fixed;
    inset: 0;
    z-index: 1040;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
      opacity 0.3s ease,
      visibility 0.3s ease;
  }

  body.is-menu-open .l-header__overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  body.is-menu-open {
    overflow: hidden;
  }

  body:not(.home) .l-main {
    margin-top: 64px;
  }
}

/* ========================================
   SP / Footer
======================================== */

@media (max-width: 1023px) {
  .l-footer {
    margin-left: 0;
    padding: 72px 24px 80px;

    background: #00246f;
  }

  .l-footer__inner {
    width: min(100%, 295px);
  }

  .l-footer__logo {
    width: 78px;
    margin-bottom: 32px;
  }

  .l-footer__store-button {
    width: 174px;
    min-height: 34px;
    margin-bottom: 36px;

    gap: 7px;
    border-radius: 4px;

    font-size: 11px;
  }

  .l-footer__store-button img:first-child {
    width: 14px;
    height: 14px;
  }

  .l-footer__store-button img:last-child {
    width: 10px;
    height: 10px;
  }

  .l-footer__company {
    margin-bottom: 14px;
    font-size: 12px;
  }

  .l-footer__notice {
    margin-bottom: 24px;
    font-size: 9px;
    line-height: 1.9;
  }

  .l-footer__support {
    gap: 8px 16px;
    margin-bottom: 14px;
  }

  .l-footer__support a {
    font-size: 10px;
  }

  .l-footer__legal {
    gap: 8px 16px;
    margin-bottom: 14px;
    padding-top: 14px;
  }

  .l-footer__legal a {
    font-size: 9px;
  }

  .l-footer__copy {
    font-size: 9px;
    line-height: 1.8;
  }
}

@media (min-width: 1024px) {
  .l-header__nav-logo {
    display: none;
  }
}

/* Collection menu hierarchy */
.l-header__child-list--collections {
  gap: 24px;
}

.l-header__collection-group {
  display: grid;
  gap: 12px;
}

.l-header__collection-group-title {
  display: block;
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.5;
}

.l-header__collection-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 14px;
  border-left: 1px solid rgba(255, 255, 255, 0.28);
}

.l-header__collection-list a {
  display: block;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}


/* Character menu accordion hierarchy */
.l-header__child-list--characters {
  align-items: start;
}

.l-header__character-index > a {
  font-weight: 700;
}

.l-header__nav-item--collection > .l-header__nav-button {
  font-size: 14px;
}

@media (max-width: 1023px) {
  .l-header__collection-list a {
    font-size: 12px;
  }
}
