* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: sans-serif;
}

/* ===== メニュー共通 ===== */
.menu {
  position: fixed;
  background: #ffffff;
  display: flex;
  align-items: center;
  height: 60px;
  width: 100%;
  z-index: 1000;
}

.menu a {
  text-decoration: none;
  color: #333;
  padding: 0 16px;
}

/*
.menu a {
  color: #333;
  text-decoration: none;
  padding: 6px 10px;
}
*/

.menu a.active {
  color: #fff;
  background-color: #007acc;
  font-weight: bold;
  border-radius: 4px;
}

/* ===== タイトル共通 ===== */
.page-title {
  position: fixed;
  background: #f5f5f5;
  width: 100%;
  height: 40px;
  display: flex;
  align-items: center;
  padding-left: 16px;
  z-index: 900;
  border-bottom: 1px solid #ddd;
}

.page-title h1 {
  font-size: 16px;
  margin: 0;
}

/* ===== PC ===== */
@media (min-width: 768px) {

  body {
    padding-top: 100px; /* 60 + 40 */
  }

  .menu {
    top: 0;
    left: 0;
  }

  .page-title {
    top: 60px;
    left: 0;
  }
}

/* ===== スマホ ===== */
@media (max-width: 767px) {

  body {
    padding-top: 40px;    /* タイトル分 */
    padding-bottom: 60px; /* メニュー分 */
  }

  .page-title {
    top: 0;
    left: 0;
  }

  .menu {
    bottom: 0;
    left: 0;
    justify-content: space-around;
    border-top: 1px solid #ccc;
  }

  .menu a {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 12px;
  }
}

/* ===== 本文 ===== */
main {
  padding: 16px;
}
