/* === ベーススタイル === */
body {
  font-family: sans-serif;
  margin: 0;
  padding: 0;
  background: #eee;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100vh;
}


#container {
  position: relative;
  width: 600px;
  height: 800px;
  background: none;
  display: flex;
  flex-direction: column;
/*  border: 1px solid #999; */
/*  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3); */
  box-sizing: border-box;
}

/* === ヘッダーとフッター === */
#header, #footer {
  position: relative;
  background: none;
  z-index: 0;
  overflow: hidden;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 18px;
  color: #000;
}

#header {
/*  border-bottom: 1px solid #ccc; */
  font-size: 26px;
}

#footer {
/*  border-top: 1px solid #ccc; */
  justify-content: space-around;
}

#header::before,
#footer::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--bg-image) center/cover no-repeat;  
  opacity: 0.2;
  z-index: -1;
}

#header::before { background-position: center top; }
#footer::before { background-position: center bottom; }

/* === グリッド === */
#grid {
  position: relative;
  width: 600px;
  height: 700px;
  display: grid;
  grid-template-columns: repeat(6, 100px);
  grid-template-rows: repeat(7, 100px);
  border: 2px solid rgba(0, 0, 0, 1);
  border: 1px solid rgba(0, 0, 0, 1);
  background: none;
  z-index: 0;
  box-sizing: border-box;
  
}

#grid::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: var(--bg-image) center/cover no-repeat;
  opacity: 0.2;
  z-index: -1;
}

/* === マス（セル） === */
.cell {
  /* width: 100px; */
  /* height: 100px; */
  border-left: 2px solid rgba(0,0,0,1);
  border-top: 2px solid rgba(0,0,0,1);

  border-left: 1px solid rgba(0,0,0,1);
  border-top: 1px solid rgba(0,0,0,1);

  background-color: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
  color: #000;
  text-align: center;
  text-transform: uppercase;
  font-size: 20px;
}

.cell-num {
  position: absolute;
  top: 0;
  left: 4px;
  font-size: 20px;
  color: #000;
  pointer-events: none;
}

.cell-text {
  font-size: 60px;
  font-weight: bold;
  text-align: center;
  line-height: 100px;
  width: 100px;
  height: 100px;
  pointer-events: none;
  overflow: hidden;
}

.cell.black {
  background-color: #000;
  border-color: #000;
  z-index: 2;
  color: transparent;
}

/* === ボタン・フッター === */
button {
  padding: 8px 16px;
  font-size: 20px;
  cursor: pointer;
}


/* === ヒント部分 === */
.clues {
  width: 580px;
  margin: 20px auto 40px auto;
  padding: 10px;
  display: flex;
  gap: 40px;
  justify-content: center;
  background: none;
}

.clues > div {
  background: white;
  padding: 10px;
  border-radius: 4px;
/*  box-shadow: 0 0 5px rgba(0,0,0,0.1); */
  flex: 1 1 45%;
}


.clues h2 {
  margin-top: 0;
  font-size: 20px;
  text-align: center; /* 追加 */
}

.clues ul {
  margin: 0;
  padding-left: 0;
  list-style: none;
  font-size: 26px;
  line-height: 1.6;
}

/* === 正解画像 === */
#result-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: none;
  z-index: 1000;
  border: none;
  margin: 0;
  box-shadow: none;
  user-select: none;
}

.inline-img {
  height: 1.2em;
  vertical-align: baseline;  /* まず基準はbaseline */
  position: relative;
  top: 0.15em; /* ←ここで微調整：下方向にずらす */
}

.cell-input {
  cursor: default;
}



#show-result-btn {
  background-color: #4caf50;  /* 緑色 */
  color: white;               /* 文字色白 */
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  cursor: pointer;
}

#all-clear-btn {
  background-color: #af4c50;  /* 緑色 */
  color: white;               /* 文字色白 */
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  cursor: pointer;
}


/* 選択中のマス（クリックでハイライト） */
.cell.selected {
  background-color: rgba(0, 200, 255, 0.4); /* 明るい黄色の半透明 */
}


.confirm-dialog {
  position: fixed;
  top: 320px;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border: 2px solid #444;
  padding: 20px;
  z-index: 10001;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}
.hidden {
  display: none;
}
.dialog-buttons {
  margin-top: 10px;
  display: flex;
  justify-content: space-around;
}



