/* ace-company.jp mobile drawer - supplements the existing Ace corporate theme. */
.ace-md-shell { display: none; }
@media (max-width: 900px) {
  body.ace-md-open { overflow: hidden !important; }
  header.header .menu.ace-md-trigger {
    border: 0; border-radius: 0; cursor: pointer;
    -webkit-appearance: none; appearance: none;
    font-family: inherit;
  }
  header.header .menu.ace-md-trigger:focus-visible {
    outline: 3px solid #e0f1ff; outline-offset: -4px;
  }
  .ace-md-shell, .ace-md-shell * { box-sizing: border-box; }
  .ace-md-shell {
    display: block; position: fixed; inset: 0; z-index: 99999;
    visibility: hidden; pointer-events: none;
    transition: visibility 270ms;
    font-family: "Noto Sans JP", "Yu Gothic", system-ui, sans-serif;
    color: #172634;
  }
  .ace-md-shell.is-open { visibility: visible; pointer-events: auto; }
  .ace-md-backdrop {
    position: absolute; inset: 0; width: 100%; height: 100%;
    border: 0; background: rgba(5, 29, 53, .60); opacity: 0;
    transition: opacity 270ms ease; cursor: pointer;
  }
  .ace-md-shell.is-open .ace-md-backdrop { opacity: 1; }
  .ace-md-panel {
    display: flex; flex-direction: column; position: absolute;
    top: 0; bottom: 0; left: 0; width: min(87vw, 350px);
    max-height: 100dvh; background: #fff; overflow: hidden;
    transform: translateX(-105%); transition: transform 270ms cubic-bezier(.2,.7,.25,1);
    box-shadow: 15px 0 55px rgba(0, 23, 44, .16);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .ace-md-shell.is-open .ace-md-panel { transform: translateX(0); }
  .ace-md-head {
    min-height: 104px; padding: 25px 21px 19px 27px;
    display: flex; justify-content: space-between; align-items: flex-start;
    background: linear-gradient(120deg, #f4fafe, #e9f5fd);
    border-bottom: 1px solid #d8e9f3;
  }
  .ace-md-brand { display: flex; flex-direction: column; gap: 7px; }
  .ace-md-brandline {
    font: 800 20px/1.2 Arial, sans-serif; letter-spacing: .14em;
    color: #086cac;
  }
  .ace-md-brand small { font: 700 9px Arial,sans-serif; letter-spacing: .21em; color: #6d8799; }
  .ace-md-close {
    width: 38px; height: 38px; border: 1px solid #c5dcea; border-radius: 50%;
    background: #fff; color: #052b52; font-size: 30px; line-height: 1;
    cursor: pointer; display: grid; place-items: center;
  }
  .ace-md-close span { transform: translateY(-2px); }
  .ace-md-close:focus-visible, .ace-md-expand:focus-visible,
  .ace-md-mainlink:focus-visible, .ace-md-subitem:focus-visible {
    outline: 3px solid #0874c9; outline-offset: -3px;
  }
  .ace-md-nav { overflow-y: auto; overscroll-behavior: contain; flex: 1; padding: 12px 0 22px; }
  .ace-md-item { border-bottom: 1px solid #e8eef2; }
  .ace-md-row { display: flex; align-items: stretch; }
  .ace-md-mainlink {
    display: flex; align-items: center; min-height: 56px; padding: 12px 7px 12px 27px;
    flex: 1; color: #152f45 !important; font-size: 14px !important;
    font-weight: 700; text-decoration: none !important;
  }
  .ace-md-mainlink:hover, .ace-md-subitem:hover { color: #0874c9 !important; background: #f1f8fd; }
  .ace-md-mainlink[aria-current="page"] { color: #0874c9 !important; }
  .ace-md-expand {
    flex: 0 0 52px; min-width: 52px; border: 0; border-left: 1px solid #eff3f6;
    background: transparent; color: #0874c9; cursor: pointer;
    display: grid; place-items: center;
  }
  .ace-md-expand span { display: block; font: 27px/1 Arial,sans-serif; transition: transform .2s; }
  .ace-md-expanded .ace-md-expand span { transform: rotate(180deg); }
  .ace-md-submenu { background: #f1f7fb; padding: 4px 0 9px; }
  .ace-md-submenu[hidden] { display: none !important; }
  .ace-md-subitem {
    display: block; font-size: 13px !important; color: #3b647e !important;
    text-decoration: none !important; padding: 12px 24px 12px 41px;
  }
  .ace-md-subitem:before { content: "—"; display: inline-block; margin-right: 12px; color: #78afcf; }
  .ace-md-subitem-parent { color: #086cac !important; font-weight: 700; }
  .ace-md-foot {
    border-top: 1px solid #e1ecf3; padding: 22px 27px 23px;
    color: #78909f; font: 700 10px Arial,sans-serif; letter-spacing: .15em;
    display: flex; flex-direction: column; gap: 6px;
  }
  .ace-md-foot span { font-size: 8px; color: #94a7b3; }
}
@media (prefers-reduced-motion: reduce) {
  .ace-md-shell, .ace-md-backdrop, .ace-md-panel, .ace-md-expand span { transition: none !important; }
}
