.cell {
    width: 30px;
    height: 30px;
    box-sizing: border-box; /* この行を追加 */
    /*
    display: inline-block;
    float: left; 
    */
    position: relative;
    border: 1px solid #ccc;
    text-align: center;
    line-height: 30px;
    font-size: 12px;
    cursor: pointer;
}

#canvas-container {
  display: grid;
  grid-template-columns: repeat(var(--m), 30px); /* セルの幅を30pxに設定 */
  grid-template-rows: repeat(var(--m), 30px); /* セルの高さを30pxに設定 */
  grid-gap: 0px; /* セル間の間隔を0に設定 */
  width: calc(30px * var(--m)); /* コンテナの幅を設定 */
  height: calc(30px * var(--m)); /* コンテナの高さを設定 */
  margin: 10% auto;
}

.cell.selected {
    background-color: #aee;
}

.cell.clone {
    background-color: #eea;
}

.cell.original {
  background-color: #aee; /* オリジナルセルの背景色 */
}


.row {
  display: flex;
}

#tile-canvas-btn.disabled {
    background-color: #ccc; /* 薄暗くする */
    cursor: not-allowed;    /* クリックを示すカーソルを禁止マークにする */
    pointer-events: none;  /* クリックイベントを無効にする */
}
/* Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.4); /* Black w/ opacity */
}

.modal-content {
    background-color: #fefefe;
    margin: 15% auto; /* 15% from the top and centered */
    padding: 20px;
    border: 1px solid #888;
    width: 300px; /* Could be more or less, depending on screen size */
}

.close-btn {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-btn:hover,
.close-btn:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}


.input-group {
    display: flex;
    align-items: center;
    gap: 10px;
}


.container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background-color: #fff;
}

.display-section {
  font-family: 'Arial', sans-serif; /* フォントファミリーを設定 */
  color: #333; /* テキストの色 */
  text-align: center; /* テキストを中央揃え */
  
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between; /* Adjust as needed */

  max-width: 600px; /* or whatever maximum width you prefer */
    margin-left: auto;
    margin-right: auto;
}

.display-section > span {
  font-size: 20px; /* フォントサイズを指定 */
  line-height: 2; /* 行の高さを指定 */
  display: inline-block; /* インラインブロック要素として表示 */
}


#display-m, #display-a, #display-b {
    font-weight: bold; /* 太字にする */
  }

.input-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px; /* 下に隙間を作る */
}


  /* モーダル内のボタンに適用するスタイル */
#modal-ok-btn,
#modal-cancel-btn {
  margin-top: 20px; /* 上に隙間を作る */
  margin-right: 10px; /* 右に隙間を作る */
}


/* ボタンの基本スタイル */
button {
    background-color: #f2f2f2; /* 背景色 */
    color: #333; /* 文字色 */
    padding: 10px 20px; /* 内側の余白 */
    border: none; /* 枠線なし */
    border-radius: 5px; /* 角の丸み */
    cursor: pointer; /* ホバー時のカーソルを指マークに */
    transition: background-color 0.3s; /* 背景色の変化を滑らかに */
  }
  
  /* ボタンにマウスを置いたときのスタイル */
  button:hover {
    background-color: #ddd; /* 背景色を少し暗く */
  }
  
  /* ボタンがアクティブ（押されている）状態のスタイル */
  button:active {
    background-color: #ccc; /* 背景色をさらに暗く */
    transform: translateY(2px); /* ボタンを少し下に動かす */
  }

  #m-input {
    width: 120px;
   }

   .cell .hide-numbers {
    display: none; 
}

/* appページのスタイル */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
}


header {
  background-color: #4CAF50;
  color: white;
  text-align: center;
  padding: 1em 0;
}

.navigation {
  list-style: none;
  padding: 0;
}
.navigation li {
  display: inline;
  margin: 0 10px;
}
.navigation a {
  color: white;
  text-decoration: none;
}

/* レスポンシブデザイン */
/* Media query for smaller screens */
@media screen and (max-width: 600px) {
  .display-section > span,
  .display-section > button {
      flex: 1 0 100%; /* Adjust flex-basis to 100% for full width */
      margin-bottom: 10px; /* adds some space between the wrapped items */
  }
}