#header-pwa-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 50px !important;
  display: flex;
  align-items: center;
  background-color: #ffffff;
  border-bottom: 1px solid #ddd;
  z-index: 1050;
}

.wrapper.with_header_mode {
  overflow: hidden;
}

.main-panel.with_header_mode {
  height: calc(100% - 50px);
  margin-top: 50px;
  overflow: auto;
}

.sidebar.with_header_mode {
  top : 50px;
}

.sidebar.with_header_mode .sidebar-wrapper {
  height: calc(100vh - 160px);
}

#header-pwa-nav .pwa_buttons {
  padding-left: 10px;
}

#header-pwa-nav .pwa_buttons > * {
  padding: 8px;
}

#header-pwa-nav button {
  width:100%;
  align-items:center;
  justify-content:center;
  font-weight: bold;
  font-size: 22px;
  background: none;
  border: none;
  color: #51cbce;
  padding: 8px 0px;
  border-radius: 8px;
  transition: background 0.2s, transform 0.1s, color 0.2s;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

#header-pwa-nav button:active:enabled {
  background: #51cbce33;
  transform: scale(0.96);
}

#header-pwa-nav button:disabled {
  color: #51cbce80;
  pointer-events: none;
}

#footer-pwa-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 12px 16px;
  z-index: 1050;
  box-shadow: 0 -2px 6px rgba(0,0,0,0.1);
  background: #f8f8f8;
  border-top: 1px solid #ddd;
}

.main-panel.with_footer_mode {
  padding-bottom: 65px;
}

.sidebar.with_footer_mode {
  position: fixed;
  left: 0;
  height: 100vh;
  top: 0;
  bottom: 65px;
  background: #ffffff;
  z-index: 1040;
  padding-bottom: 65px;
}
.sidebar.with_footer_mode .sidebar-wrapper {
  height: calc(100% - 125px); /* ロゴ・ "＜" ボタン・余白の高さを引く */
  margin-bottom: 15px;
}

#footer-pwa-nav .pwa_buttons{
  width:100%;
}

#footer-pwa-nav .pwa_buttons > * {
  flex: 1 1 0;
  min-width: 0;
}

#footer-pwa-nav button {
  width:100%;
  align-items:center;
  justify-content:center;
  font-size: 16px;
  background: none;
  border: none;
  color: #007aff;
  padding: 8px 0px;
  border-radius: 8px;
  transition: background 0.2s, transform 0.1s, color 0.2s;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

#footer-pwa-nav button:active:enabled {
  background: rgba(0, 122, 255, 0.1);
  transform: scale(0.96);
}

#footer-pwa-nav button:disabled {
  color: #aaaaaa;
  pointer-events: none;
}