body {
  margin: 0;
  font-family: 'Zen Maru Gothic', sans-serif;
  background: #f4f3ee;
  color: #2d4739;
}

.container {
  text-align: center;
  padding-top: 80px;
}


@media screen and (min-width: 650px) {

.title {
  font-size: 3em;
  margin: 10px 0;
  color: #3d5a4b;
}

.subtitle {
  font-size: 1.2em;
  margin-bottom: 40px;
  color: #5b7063;
}
.head{
  margin-left: 50px;
  margin-right: 50px;;
}
.plant{
  float: left;
  width: 25%;
  height: 150px;
  background: url('./images/plant.png') no-repeat center;
  background-size: contain;
  margin: 0px auto 20px;
  animation: float 4s ease-in-out infinite;
}
.sitename{
  float: left;
  width: 50%;
}
.book {
  float: left;
  width: 25%;
  height: 100px;
  background: url('./images/book.png') no-repeat center;
  background-size: contain;
  margin: 30px auto 20px;
  animation: float 4s ease-in-out infinite;
}
.clearBoth{
  clear: both;
}
.menu{
  margin-left: 50px;
  margin-right: 50px;;
}
.menu button {
  margin: 10px;
  padding: 12px 24px;
  border: 2px solid #3d5a4b;
  background-color: #ffffff;
  border-radius: 8px;
  font-size: 1em;
  color: #3d5a4b;
  transition: 0.3s ease;
}

.menu button:hover {
  background-color: #e4ede7;
  cursor: pointer;
}

.menuNoInput {
  margin: 20px 0;
  text-align: center;
}

/* 共通設定 */
input[type="text"],
input[type="button"] {
  height: 44px; /* 明示的に高さを固定 */
  line-height: 1.2;
  font-size: 1em;
  box-sizing: border-box;
  border-radius: 12px;
  border: 2px solid #3d5a4b;
  padding: 0 16px;
}

/* テキスト入力 */
input[type="text"] {
  width: 200px;
  background-color: #fdfdfd;
  color: #2e4036;
  outline: none;
  transition: all 0.3s ease;
}

input[type="text"]:focus {
  border-color: #5b7f6b;
  background-color: #f1f5f3;
  box-shadow: 0 0 4px #b5c7b5;
}

/* ボタン */
input[type="button"] {
  margin-left: 10px;
  background-color: #ffffff;
  color: #3d5a4b;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

input[type="button"]:hover {
  background-color: #e4ede7;
  transform: translateY(-2px);
}

input[type="button"]:active {
  transform: scale(0.98);
}
  .icon-grid { 
    display: grid;
    grid-template-columns: repeat(4, 160px);
    gap: 40px;
    padding: 40px;
    justify-content: center;
    justify-items: center;   /* ← 追加：セル内で中央寄せ */
  }

.icon-item {
  width: 80px;
  height: 80px;
  background-color: #f0f4f2;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 48px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: transform 0.2s;
}

.icon-item:hover {
  transform: scale(1.05);
  cursor: pointer;
}

}


@media screen and (max-width: 650px) {
.title {
  font-size: 3em;
  margin: 10px 0;
  color: #3d5a4b;
}

.subtitle {
  font-size: 1.2em;
  margin-bottom: 40px;
  color: #5b7063;
}
.head{
  margin-left: 20px;
  margin-right: 20px;;
}
.plant{
  float: left;
  width: 15%;
  height: 150px;
  background: url('./images/plant.png') no-repeat center;
  background-size: contain;
  margin: 0px auto 20px;
  animation: float 4s ease-in-out infinite;
}
.sitename{
  float: left;
  width: 70%;
}
.book {
  float: left;
  width: 15%;
  height: 100px;
  background: url('./images/book.png') no-repeat center;
  background-size: contain;
  margin: 30px auto 20px;
  animation: float 4s ease-in-out infinite;
}
.clearBoth{
  clear: both;
}
.menu{
  margin-left: 20px;
  margin-right: 20px;
}
.menu button {
  margin: 10px;
  padding: 12px 24px;
  border: 2px solid #3d5a4b;
  background-color: #ffffff;
  border-radius: 8px;
  font-size: 1em;
  color: #3d5a4b;
  transition: 0.3s ease;
}

.menu button:hover {
  background-color: #e4ede7;
  cursor: pointer;
}

.menuNoInput {
  margin: 20px 0;
  text-align: center;
}

/* 共通設定 */
input[type="text"],
input[type="button"] {
  height: 44px; /* 明示的に高さを固定 */
  line-height: 1.2;
  font-size: 1em;
  box-sizing: border-box;
  border-radius: 12px;
  border: 2px solid #3d5a4b;
  padding: 0 16px;
}

/* テキスト入力 */
input[type="text"] {
  width: 200px;
  background-color: #fdfdfd;
  color: #2e4036;
  outline: none;
  transition: all 0.3s ease;
}

input[type="text"]:focus {
  border-color: #5b7f6b;
  background-color: #f1f5f3;
  box-shadow: 0 0 4px #b5c7b5;
}

/* ボタン */
input[type="button"] {
  margin-left: 10px;
  background-color: #ffffff;
  color: #3d5a4b;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

input[type="button"]:hover {
  background-color: #e4ede7;
  transform: translateY(-2px);
}

input[type="button"]:active {
  transform: scale(0.98);
}
  .icon-grid {
    display: grid;
    /* 3等分しつつ中央寄せ。gap/paddingがあっても安定 */
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    padding: 20px 16px;
    justify-content: center;  /* ← これが効く */
  }

  /* 固定サイズのアイテムをセル中央に置く */
  .icon-item {
    width: 60px;
    height: 60px;
	border-radius: 8px;
    margin: 0 auto;           /* 念のためセル内でも中央 */
    display: flex;
    align-items: center;
    justify-content: center;
  }

.icon-item:hover {
  transform: scale(1.05);
  cursor: pointer;
}

}


#icon-item-railway{
  background: url('./images/p_railway.png') no-repeat center;
  background-size: contain;
}
#icon-item-road{
  background: url('./images/p_road.png') no-repeat center;
  background-size: contain;
}
#icon-item-any{
  background: url('./images/p_any.png') no-repeat center;
  background-size: contain;
}
#icon-item-chart{
  background: url('./images/p_chart.png') no-repeat center;
  background-size: contain;
}
#icon-item-memo{
  background: url('./images/p_memo.png') no-repeat center;
  background-size: contain;
}
#icon-item-pict{
  background: url('./images/p_pict.png') no-repeat center;
  background-size: contain;
}
#icon-item-nurie{
  background: url('./images/p_nurie.png') no-repeat center;
  background-size: contain;
}
#icon-item-timetable{
  background: url('./images/p_timetable.png') no-repeat center;
  background-size: contain;
}
#icon-item-point{
  background: url('./images/p_point.png') no-repeat center;
  background-size: contain;
  filter: grayscale(1);
  opacity: 0.25;
}
#icon-item-nigaoe{
  background: url('./images/p_nigaoe.png') no-repeat center;
  background-size: contain;
  filter: grayscale(1);
  opacity: 0.25;
}
#icon-item-quiz{
  background: url('./images/p_quiz.png') no-repeat center;
  background-size: contain;
}

.icon-item-func-login{
  background: url('./images/p_func_login.png') no-repeat center;
  background-size: contain;
}
.icon-item-func-logout{
  background: url('./images/p_func_logout.png') no-repeat center;
  background-size: contain;
}
.icon-item-func-clipList{
  background: url('./images/p_func_clipList.png') no-repeat center;
  background-size: contain;
  filter: grayscale(1);
  opacity: 0.25;
}
.icon-item-func-clipComment{
  background: url('./images/p_func_clipComment.png') no-repeat center;
  background-size: contain;
  filter: grayscale(1);
  opacity: 0.25;
}
.icon-item-func-history{
  background: url('./images/p_func_history.png') no-repeat center;
  background-size: contain;
}
.icon-item-func-link{
  background: url('./images/p_func_link.png') no-repeat center;
  background-size: contain;
}



@keyframes float {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}
