/*
 * Responsive overrides for the legacy desktop layout.
 * Desktop styling in main.css remains unchanged above 900px.
 */

.responsive-toggle {
  display: none;
}

.responsive-menu-link-label {
  display: none;
}

.sideEntryBanner {
  width: 256px;
  margin: 0;
  padding: 10px 0 0;
}

.sideEntryBanner a,
.sideEntryBanner img {
  display: block;
}

.sideEntryBanner img {
  width: 240px;
  height: auto;
  margin: 0 auto;
  border: 0;
}

@media screen and (max-width: 900px) {
  body {
    font-size: 100%;
    -webkit-text-size-adjust: 100%;
  }

  img {
    max-width: 100%;
    height: auto;
  }

  .responsive-toggle {
    appearance: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 48px;
    padding: 11px 16px;
    border: 0;
    border-radius: 4px;
    box-sizing: border-box;
    background-color: #3f3f3f;
    color: #ffffff;
    font: inherit;
    font-weight: 700;
    line-height: 1.4;
    text-align: left;
    cursor: pointer;
  }

  .responsive-toggle:hover {
    background-color: #535353;
  }

  .responsive-toggle:focus-visible {
    outline: 3px solid #ff7f01;
    outline-offset: 2px;
  }

  .responsive-toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    margin-left: 12px;
    border: 1px solid currentColor;
    border-radius: 50%;
    font-size: 22px;
    font-weight: 400;
    line-height: 1;
  }

  .responsive-toggle-icon::before {
    content: "+";
  }

  .responsive-toggle[aria-expanded="true"] .responsive-toggle-icon::before {
    content: "\2212";
  }

  #responsive-nav-toggle {
    clear: both;
    margin-top: 12px;
    background-color: #ff7f01;
  }

  #responsive-nav-toggle:hover {
    background-color: #e66f00;
  }

  #responsive-footer-toggle,
  #responsive-exp-footer-toggle {
    clear: both;
    width: calc(100% - 10px);
    margin: 20px 0 0 5px;
  }

  #responsive-exp-footer-toggle {
    width: calc(100% - 64px);
    margin-left: 32px;
  }

  html.responsive-accordion-ready .responsive-accordion-panel[data-accordion-open="false"] {
    display: none !important;
  }

  html.responsive-accordion-ready #indexNavBox.responsive-accordion-panel[data-accordion-open="false"] {
    display: block !important;
    padding-top: 0;
  }

  html.responsive-accordion-ready #indexNavBox.responsive-accordion-panel[data-accordion-open="false"] > ul {
    display: none;
  }

  #container {
    width: 100%;
    margin-left: 0;
    padding: 0 16px;
    box-sizing: border-box;
    background-image: none;
  }

  #wrapper,
  #box01,
  #box02,
  #p2Box02 {
    width: 100%;
    box-sizing: border-box;
  }

  h1,
  a#topLink,
  a:hover#topLink {
    width: 100%;
    height: auto;
    aspect-ratio: 808 / 292;
    background-size: 100% auto;
  }

  #box01 {
    display: flex;
    flex-wrap: wrap;
  }

  #indexNavBox,
  #navBox {
    float: none;
    width: 100%;
    padding-top: 12px;
    background-image: none;
  }

  #indexNavBox ul,
  #navBox ul {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
  }

  div#indexNavBox ul li,
  div#navBox ul li,
  h2#navBox ul li,
  h2#navBox ul li#navBoxBtm {
    width: auto;
    height: auto;
    padding-bottom: 0;
    background-size: 100% 100%;
  }

  #navBgJobDt,
  #navBgRemunerateDt,
  #navBgEntryDt,
  #navBgInquiryDt,
  #navBgFaqDt,
  #navBgJob,
  #navBgRemunerate,
  #navBgEntry,
  #navBgInquiry,
  #navBgFaq,
  a#navBgJob:hover,
  a#navBgRemunerate:hover,
  a#navBgEntry:hover,
  a#navBgInquiry:hover,
  a#navBgFaq:hover {
    position: static;
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 259 / 65;
    background-size: 100% 100%;
  }

  #navBox a,
  #navBox img {
    display: block;
    width: 100%;
  }

  #indexNavBoxBtm {
    display: none;
  }

  .sideEntryBanner {
    width: 100%;
    padding-top: 16px;
    box-sizing: border-box;
    text-align: center;
  }

  .sideEntryBanner img {
    width: min(240px, 70vw);
  }

  #indexNavBox li,
  #navBox li {
    background-image: none !important;
  }

  #indexNavBox a.responsive-text-link,
  #navBox a.responsive-text-link,
  #indexNavBox a.responsive-text-link:hover,
  #navBox a.responsive-text-link:hover {
    position: static;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: auto;
    min-height: 52px;
    padding: 9px 8px;
    border: 1px solid #d7d7d7;
    border-left: 5px solid #ff7f01;
    border-radius: 3px;
    box-sizing: border-box;
    aspect-ratio: auto;
    background: #ffffff none !important;
    color: #333333;
    font-weight: 700;
    line-height: 1.35;
    text-align: center;
  }

  #indexNavBox a.responsive-text-link:hover,
  #navBox a.responsive-text-link:hover {
    background-color: #fff3e8 !important;
    color: #e66f00;
  }

  #indexNavBox a.responsive-text-link .nne,
  #navBox a.responsive-text-link img {
    display: none;
  }

  #indexNavBox .responsive-menu-link-label,
  #navBox .responsive-menu-link-label {
    display: block;
  }

  #cts01,
  #p2Cts01 {
    float: none;
    width: 100%;
    margin-top: 16px;
    box-sizing: border-box;
    background-size: 100% 1px;
  }

  #topCts01Txt,
  #p2Cts01Txt02,
  .p2Cts01Txt,
  .p2Cts01Txt02,
  #entryCts01Txt,
  #p5Cts01Txt,
  #tab01Cts01Txt,
  #tab02Cts01Txt,
  #tab03Cts01Txt,
  div#tab04Cts01Txt,
  #linkList,
  #sitemapList {
    width: auto;
    margin-left: 60px;
    margin-right: 60px;
    box-sizing: border-box;
  }

  #h3Bg {
    margin-right: 60px;
  }

  #box02 {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 24px;
    padding-top: 32px;
  }

  #box02L,
  #box02R,
  #p2Box02L,
  #p2Box02R {
    float: none;
  }

  #box02R,
  #p2Box02R {
    width: 100%;
    box-sizing: border-box;
    background-size: 100% 1px;
  }

  #box02R {
    margin-bottom: 48px;
  }

  #box02R02 {
    margin-right: 20px;
  }

  div#box02R p {
    width: auto;
    padding-right: 30px;
  }

  #p2Box02 {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr);
    gap: 24px;
  }

  #p2Box02L {
    margin-bottom: 30px;
  }

  #ttl02 img {
    width: auto;
  }

  table.entry {
    width: calc(100% - 40px);
    margin: 0 20px 20px;
    padding-left: 0;
    box-sizing: border-box;
  }

  table.entry input[type="text"],
  table.entry input[type="email"],
  table.entry textarea,
  table.entry select {
    max-width: 100%;
    box-sizing: border-box;
  }

  table.entry input[type="submit"],
  table.entry input[type="button"] {
    min-height: 40px;
    padding: 8px 16px;
  }

  #tabBox,
  #p2TabBox {
    float: none;
    clear: both;
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 20px;
    gap: 6px;
  }

  #tabBox ul {
    display: flex;
    gap: 6px;
  }

  #ft {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 18px;
    width: calc(100% - 10px);
    height: auto;
    min-height: 36px;
    margin-bottom: 20px;
    padding: 8px 12px;
    box-sizing: border-box;
  }

  div#ft p,
  #goTop {
    float: none;
    margin-left: 0;
    margin-right: 0;
    white-space: nowrap;
  }

  #goTop {
    margin-left: auto;
  }

  /* Experience pages */
  #expBg,
  #container02 {
    width: 100%;
    box-sizing: border-box;
  }

  #expBg {
    margin: 0;
  }

  #expTop,
  a#topLink02,
  a:hover#topLink02 {
    width: calc(100% - 64px);
    height: auto;
    aspect-ratio: 600 / 137;
    margin-left: 32px;
    background-size: 100% auto;
  }

  #expFrame {
    width: calc(100% - 64px);
    margin-left: 32px;
    padding: 30px 64px 0;
    box-sizing: border-box;
    background-size: 100% 1px;
  }

  #expTtl01,
  .expTxt01,
  .expLink01 {
    width: 100%;
    box-sizing: border-box;
  }

  #expFrameBtm,
  #expEntryBox,
  #expFt {
    width: calc(100% - 64px);
    margin-left: 32px;
    box-sizing: border-box;
  }

  #expFrameBtm {
    height: auto;
    aspect-ratio: 600 / 124;
    background-size: 100% auto;
  }

  #expEntryLink,
  #expFtLink {
    width: calc(100% - 40px);
    margin-left: 20px;
    box-sizing: border-box;
  }

  /* Region pages */
  #container03,
  #regionTop,
  #regionCts01,
  #regionCts02 {
    width: 100%;
    box-sizing: border-box;
  }

  #container03 {
    margin: 0;
  }

  #regionTop,
  a#topLink03,
  a:hover#topLink03 {
    width: 100%;
    height: auto;
    aspect-ratio: 900 / 116;
    background-size: 100% auto;
  }

  #regionLeft {
    width: 38.888%;
    margin-left: 3.333%;
    background-size: 100% auto;
  }

  #regionRight {
    margin-left: 44%;
    margin-right: 3.333%;
    padding: 16px;
    box-sizing: border-box;
  }

  #regionCts02 {
    height: auto;
    min-height: 440px;
    background-size: 100% auto;
  }

  #regionCts0201 {
    margin-top: 0;
    padding-top: 50px;
  }
}

@media screen and (max-width: 640px) {
  body {
    font-size: 100%;
    line-height: 1.7;
  }

  #container {
    padding: 0 10px;
  }

  #mobileLnk {
    margin: 0;
    padding: 8px 4px;
    font-size: 12px;
    line-height: 1.4;
  }

  #indexNavBox ul,
  #navBox ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  #indexNavBox li:last-child,
  #navBox li:last-child {
    grid-column: 1 / -1;
    width: calc(50% - 4px);
    justify-self: center;
  }

  #cts01,
  #p2Cts01 {
    padding-top: 20px;
  }

  #h3Bg {
    margin-left: 20px;
    margin-right: 20px;
    margin-bottom: 16px;
  }

  #topCts01Txt,
  #p2Cts01Txt02,
  .p2Cts01Txt,
  .p2Cts01Txt02,
  #entryCts01Txt,
  #p5Cts01Txt,
  #tab01Cts01Txt,
  #tab02Cts01Txt,
  #tab03Cts01Txt,
  div#tab04Cts01Txt,
  #linkList,
  #sitemapList {
    width: auto;
    margin-left: 20px;
    margin-right: 20px;
  }

  #topCts01Txt {
    margin-top: 12px;
    line-height: 1.8;
  }

  .ctsTxt01 {
    font-size: 115%;
  }

  #box02,
  #p2Box02 {
    display: block;
    padding-top: 24px;
  }

  #box02L,
  #p2Box02L {
    width: 100%;
    text-align: center;
  }

  #qrBan01,
  #p2Box02L img {
    margin-left: auto;
    margin-right: auto;
  }

  #box02R,
  #p2Box02R {
    margin-top: 20px;
    margin-bottom: 32px;
  }

  #box02R02 {
    margin-left: 16px;
    margin-right: 16px;
  }

  div#box02R p {
    padding: 16px 12px;
  }

  div#box02R02 > ol {
    margin-left: 18px;
    padding-right: 8px;
    background-image: none;
  }

  table.entry {
    width: calc(100% - 20px);
    margin-left: 10px;
    margin-right: 10px;
    font-size: 14px;
  }

  table.entry tr {
    height: auto;
  }

  table.entry td {
    padding: 10px 6px;
    vertical-align: top;
  }

  table.entry td.title {
    width: 30%;
  }

  table.entry input[type="text"],
  table.entry input[type="email"],
  table.entry textarea,
  table.entry select {
    width: 100%;
    min-height: 40px;
    font-size: 16px;
  }

  .entryLinkMgn,
  .entryLink {
    margin-left: 0;
  }

  #rank,
  ol#rank li {
    width: 100%;
    box-sizing: border-box;
  }

  #ft {
    gap: 8px 14px;
  }

  div#ft p {
    font-size: 75%;
  }

  #goTop {
    width: 100%;
    margin-left: 0;
    text-align: right;
    background-position: calc(100% - 28px) 50%;
  }

  /* Experience pages */
  #expTop,
  a#topLink02,
  a:hover#topLink02,
  #expFrame,
  #expFrameBtm,
  #expEntryBox,
  #expFt {
    width: calc(100% - 20px);
    margin-left: 10px;
  }

  #expFrame {
    padding: 24px 20px 0;
    background-image: none;
  }

  #expTtl01 {
    font-size: 110%;
  }

  .expTxt01 {
    line-height: 1.8;
  }

  #expEntryLink {
    padding: 16px 8px;
  }

  #expFt {
    height: auto;
    padding: 28px 0;
  }

  #expFtLink {
    height: auto;
  }

  #responsive-exp-footer-toggle {
    width: calc(100% - 20px);
    margin-left: 10px;
  }

  /* Region pages */
  #regionBg {
    padding: 0 10px;
  }

  #regionCts01,
  #regionCts02 {
    background-image: none;
    background-color: #ffffff;
  }

  #regionLeft {
    float: none;
    width: min(100%, 350px);
    height: auto;
    aspect-ratio: 350 / 360;
    margin: 0 auto;
  }

  #regionRight {
    width: 100%;
    margin: 0;
    background-image: none;
  }

  #regionCts02 {
    min-height: 0;
  }

  #regionCts0201 {
    margin: 0;
    padding: 24px 16px;
  }
}
