/* 共通のbody表示 */
body {
  font-family: "Arial", sans-serif;
  background-color: #fefefe;
  margin: 0;
  padding: 0;
}

body.modal-open {
  overflow: hidden;
}

/* 共通のimg表示 */
img {
  display: block;
  max-width: 80%;
  height: auto;
  margin: 5px auto;
}

@media screen and (max-width: 600px) {
  body {
    font-size: 16px;
  }

  h1 {
    font-size: 22px;
    margin: 16px 0 24px;
  }

  img {
    max-width: 100%;
    margin: 1px auto;
  }

  .button-style {
    width: 100%;
    font-size: 18px;
    padding: 12px 0;
    text-align: center;
  }

  #user-info {
    top: auto;
    bottom: 10px;
    right: 10px;
    flex-direction: column;
    align-items: flex-end;
    font-size: 13px;
    padding: 10px;
    gap: 6px;
  }

  #user-info .auth-button,
  #user-info .login-status {
    width: 100%;
    font-size: 14px;
  }

  #user-info .login-status {
    max-width: 160px;
    text-align: right;
  }
}

h1 {
  text-align: center;
  margin: 20px 0 30px;
  font-size: 32px;
}

h2 {
  font-size: 20px;
  margin-bottom: 10px;
}

.button-style,
.comment-button,
.comment-delete-button,
.modal-close,
.close-button {
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.button-style {
  display: inline-block;
  background-color: #007acc;
  color: #fff;
  padding: 10px 18px;
  font-size: 16px;
  margin: 6px 0;
  transition: background-color 0.3s;
}

.button-style:hover {
  background-color: #005fa3;
}

.comment-button {
  position: absolute;
  top: 5px;
  right: 5px;
  padding: 6px 12px;
  font-size: 13px;
  background-color: #3a89c9;
  color: white;
}

.comment-button:hover {
  background-color: #2f6da5;
}

.comment-delete-button {
  padding: 4px 8px;
  font-size: 12px;
  background-color: #cc3b3b;
  color: white;
  z-index: 1;
}

.comment-delete-button:hover {
  background-color: #a62828;
}

.modal-close,
.close-button {
  font-size: 24px;
  background: transparent;
  position: absolute;
  top: 10px;
  right: 10px;
  font-weight: bold;
  color: #444;
}

.modal-close:hover,
.close-button:hover {
  color: #000;
}

.comment-input-wrapper {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  position: relative;
}

.comment-textarea {
  width: 100%;
  max-width: 500px;
  padding: 10px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 5px;
  resize: vertical;
  margin-bottom: 10px;
  box-sizing: border-box;
}

.comment-button-wrapper {
  text-align: right;
  margin-top: 8px;
}

ans {
  display: inline-block;
  font-family: Consolas, Monaco, 'Courier New', monospace;
  background-color: #f9f9f9;
  color: #333;
  padding: 4px 8px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 0.95em;
  margin: 2px;
}

.answer-panel ans {
  display: block;
  margin-bottom: 6px;
}

inyo {
  display: inline-block;
  font-family: "IPAゴシック", "IPAGothic", sans-serif;
  background-color: #f0f0f0;
  color: #333;
  padding: 2px 6px;
  border-radius: 4px;
  border: 1px solid #ccc;
  font-size: 0.95em;
}

.accordion {
  margin-bottom: 16px;
}

.accordion-button {
  width: 100%;
  text-align: left;
  padding: 12px 16px;
  font-size: 16px;
  background-color: #e0e0e0;
  border-radius: 6px;
  transition: background-color 0.3s;
}

.accordion-button:hover {
  background-color: #d0d0d0;
}

.accordion-content {
  background-color: #f9f9f9;
  border-left: 3px solid #ccc;
  padding: 0 16px;
  display: none;
  margin-top: 8px;
  padding-left: 12px;
  transition: max-height 0.4s ease, padding 0.3s ease;
}

.accordion-content.open {
  display: block;
  max-height: 500px;
  padding: 12px 16px;
}

#overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(128, 128, 128, 0.6);
  z-index: 900;
}

#answerBox,
.modal-content {
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
}

#answerBox {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 800px;
  width: 90%;
  z-index: 1000;
  display: none;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  width: 100%;
  height: 100%;
  display: flex;
  background-color: rgba(0, 0, 0, 0.5);
  justify-content: center;
  align-items: center;
}

.modal-content {
  width: 90%;
  max-width: 600px;
}

.toggle-box {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  z-index: 9999;
  background: #fff;
  padding: 24px;
  width: 80%;
  max-width: 1000px;
  max-height: 80vh;
  overflow-y: auto;
  border-radius: 12px;
  box-sizing: border-box;
}



.toggle-box h3 {
  margin-top: 20px;
  font-size: 18px;
  padding-bottom: 10px;
  padding-top: 30px;
}

label {
  display: block;
  margin: 10px 0;
}

input[type="text"] {
  width: 100%;
  padding: 6px 10px;
  font-size: 16px;
  margin-top: 5px;
  border: 1px solid #aaa;
  border-radius: 4px;
  box-sizing: border-box;
}

.container,
section,
.content {
  max-width: 800px;
  margin: 10px auto;
  padding: 20px;
  background-color: #ffffff;
  border: 1px solid #ccc;
  border-radius: 10px;
}

.container {
  margin: 40px auto;
  text-align: center;
}

.fixed-button {
  position: fixed;
  right: 10px;
  padding: 14px 24px;
  font-size: 18px;
  background-color: #007bff;
  color: white;
  border-radius: 15px;
}

.fixed-button:hover {
  background-color: #0056b3;
}

.fixed-button:nth-of-type(1) {
  bottom: 60px;
}

.fixed-button:nth-of-type(2) {
  bottom: 150px;
}

.comment-section {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: #ffffff;
  padding: 20px;
  border-radius: 12px;
  width: 90%;
  max-width: 600px;
  max-height: 70vh;
  overflow-y: auto;
  z-index: 1001;
}

.hidden {
  display: none !important;
}
