/* =========================================================
   Desktop default: hide mobile nav UI
   ========================================================= */
.nav-toggle,
.nav-backdrop {
  display: none;
}

/* =========================================================
   Mobile styles
   ========================================================= */
@media screen and (max-width: 768px) {

  /* =========================================================
     Base / Reset (mobile)
     ========================================================= */

  html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  /* Predictable width calculations */
  *, *::before, *::after {
    box-sizing: border-box;
  }

  body {
    margin: 0;
    min-width: 0;
    font-size: 14px;
  }

  img, svg, video, iframe {
    max-width: 100%;
    height: auto;
  }


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

  .header_box2 {
    display: flex;
    align-items: center;
    width: 100%;
    height: auto;
    margin: 0;
    padding: 8px 10px;
  }

  .header_box2 .box_imageLeft {
    position: static;
    margin: 10px 0 0 10px;
  }

  .header_box2 .box_Right {
    position: static;
    margin-left: auto;
    text-align: right;
    font-size: 11px;
  }

  /* Mobile: hide PC header text, show mobile header text */
  .header_pc { display: none; }
  .header_sp { display: inline; }

  .twitter-follow-button {
    display: none !important;
  }



  /* =========================================================
     Layout: Container & Main
     ========================================================= */

  .container {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin: 0;
    padding: 0 10px 20px;
  }

  main {
    width: 100%;
    max-width: 100%;
    margin: 10px 0 0 0;
    padding: 0 0 40px 0;
  }

  main p {
    margin: 0 0 1em 0;
    font-size: 14px;
    line-height: 1.75;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
  }


  /* =========================================================
     Title Image (Profile / Company Info)
     ========================================================= */

  .title_image {
    width: 100%;
    max-width: 100%;
    height: auto;
    margin: 8px 0 10px 0;
  }

  .title_corp_bg {
    width: 100%;
    max-width: 100%;
    height: 200px;
  }

  .title_corp_logo {
    top: 14px;
    left: 12px;
    height: 26px;
  }

  .title_corp_label {
    top: 60px;
    left: 12px;
    padding: 6px 12px 4px;
  }

  .title_corp_label .jp { font-size: 12px; }
  .title_corp_label .en { font-size: 9px; }


  /* =========================================================
     Breadcrumb / Small Info Bar
     ========================================================= */

  .navilink_i,
  .box_mds,
  .box_mds_s {
    width: 100%;
    max-width: 100%;
  }

  .navilink_i {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 2px 4px;
    min-height: 23px;
    height: auto;
    padding: 8px 4px;
    margin: 13px 0 23px 0;
    font-size: 12px;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .navilink_i i,
  .navilink_i a,
  .navilink_i span {
    line-height: 1.4;
  }


  /* =========================================================
     Navigation (Left menu) - Mobile hamburger / off-canvas
     ========================================================= */

  /* Toggle button (mobile only) */
  .nav-toggle {
  /* Positioning */
    position: fixed;
    top: 44px;
    right: 10px;
    z-index: 1103;

  /* Layout */
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;

  /* Typography */
    font-size: 14px;
    line-height: 1;
    cursor: pointer;

  /* Reset (iOS / browser default) */
    -webkit-appearance: none;
    appearance: none;

  /* Visual */
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 999px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);

  /* Color */
    color: #333;
    background-color: #fff;
    text-decoration: none;
  }

  /* Nav toggle states (prevent iOS blue link color) */
  .nav-toggle,
  .nav-toggle:visited,
  .nav-toggle:active,
  .nav-toggle:focus {
    color: #333;
  }

  .nav-toggle:focus {
    outline: 2px solid #666;
    outline-offset: 2px;
  }

  /* Backdrop behind the drawer */
  .nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 1100;
    display: none;
  }

  body.nav-open .nav-backdrop {
    display: block;
  }

  /* Drawer container */
  #left-nav {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(86vw, 360px);
    max-width: 100vw;
    background: #fff;
    z-index: 1102;
    border-radius: 0 4px 4px 0;
    overflow: hidden;
    transform: translateX(-105%);
    transition: transform 0.25s ease;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
  }

  body.nav-open #left-nav {
    transform: translateX(0);
  }

  #left-nav .left-nav-inner {
    height: 100%;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;

    padding: 10px 0;
    padding-bottom: max(env(safe-area-inset-bottom), 4px);
  }

  body.nav-open {
    overflow: hidden;
    touch-action: none;
  }

  /* iOS Safari */
  @supports (-webkit-touch-callout: none) {
    #left-nav {
      max-height: -webkit-fill-available;
    }
  }

  /* Menu item cards */
  .navi_title {
    display: block;
    width: 100%;
    height: auto;
    margin: 0 0 6px 0;
    padding: 10px 12px;
    font-size: 14px;
    line-height: 1.5;
  }

  .navi_title span {
    position: static;
    transform: none;
    white-space: normal;
  }

  .navi_title span:nth-child(1) {
    opacity: 1;
    position: static;
    transform: none;
  }

  /* Hide English line on mobile */
  .navi_title span:nth-child(2) {
    display: none;
  }

  .navi_sns {
    width: 100%;
    margin: 8px 0 10px 0;
  }

  .box_sns {
    justify-content: center;
    gap: 10px 8px;
  }


  /* =========================================================
     Title Bar (Section Heading)
     ========================================================= */

  .box_mds {
    width: 100%;
    margin: 14px 0 6px 0;
    padding: 10px 8px 4px 8px;
  }

  .box_mds p {
    font-size: 16px;
    line-height: 1.45;
  }


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

  footer {
    height: auto;
    padding: 8px 10px;
  }

  .footer_box .box_imageRight {
    position: static;
    display: block;
    margin: 8px 0;
    text-align: center;
  }


  /* =========================================================
     Page Top Button
     ========================================================= */

  #page_top {
    width: 38px;
    height: 38px;
    right: 8px;
    bottom: 20px;
  }



  /* =========================================================
     Final safety net: kill legacy fixed widths (mobile only)
     Keep this section LAST inside the media query.
     ========================================================= */

  .container,
  main,
  header,
  footer,
  .title_image,
  .title_corp_bg,
  .navilink_i,
  .box_mds,
  .box_mds_s,
  .greeting,
  .greeting-en,
  .name {
    width: 100% !important;
    max-width: 100% !important;
  }

}