*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  padding: 20px 0;
}
main {
  width: 900px;
  min-height: 500px;
  margin: 0 auto;
  /* padding: 50px 30px; */
  background-color: #ddeaf6;
  border: 1px solid #000;
  position: relative;
}
.wrapper {
  padding: 50px 0px;
}
h1 {
  text-align: center;
  font-size: 24px;
}
input[type="submit"] {
  width: 170px;
  padding: 5px 20px;
  background-color: #4472c4;
  color: #fff;
  text-align: center;
  border: #16305e 1px solid;
  border-radius: 5px;
}
input[type="submit"]:hover {
  background-color: #3766b9;
  cursor: pointer;
}
.center_div {
  text-align: center;
}
.center_p {
  text-align: center;
}
.button_a {
  display: inline-block;
  width: 170px;
  margin-top: 20px;
  padding: 5px 20px;
  background-color: #fff;
  color: #16305e;
  text-align: center;
  border: #16305e 1px solid;
  border-radius: 5px;
  font-size: 14px;
  text-decoration: none;
}
.button_a:hover {
  background-color: #e9e9e9;
}
.button_a_blue {
  background-color: #4472c4;
  color: #fff;
  border: #16305e 1px solid;
}
.button_a_blue:hover {
  background-color: #3766b9;
}

/* ヘッダー */
header {
  width: 100%;
  height: 80px;
  /* position: absolute;
  top: 0;
  left: 0; */
  padding: 10px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #fbe4d5;
}
/* .header_wrapper {
  width: 900px;
  margin: 0 auto;
  padding: 20px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #fbe4d5;
  border: 1px solid #000;
  border-bottom: none;
} */
.header_button_a {
  background-color: rgba(255,255,255,0);
}
.header_button_a:hover {
  background-color: rgba(255,255,255,0.3);
}
.header_admin {
  background-color: #D8D8D8
}
.header_admin h1 {
  font-size: 18px;
  font-weight: bold;
}
.header_admin_right {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}
.header_admin .header_button_a {
  margin-top: 0;
  width: 150px;
}

/* フッター */
footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 50px;
  padding: 10px 20px;
  display: flex;
  justify-content: end;
  background-color: #fbe4d5;
}
.footer_button_a {
  width: 50px;
  margin-top: -3px;
  padding: 5px 5px;
  background-color: rgba(255,255,255,0);
}
.footer_button_a:hover {
  background-color: rgba(255,255,255,0.3);
}
.footer_admin {
  background-color: #D8D8D8
}


/* トップ画面 */
.topLogo {
  padding-top: 140px;
  color: #fff;
  font-size: 50px;
}

/* 会員情報登録フォーム */
.mr_container {
  width: 400px;
  margin: 20px auto;
}
.mr-errors {
  width: 300px;
  margin: 0 auto;
  color: red;
  font-size: 12px;
}
.mr_contentsWrapper {
  padding-bottom: 20px;
}
.mr_nameInputWrapper {
  display: flex;
  justify-content: space-between;
}
.mr_inputs {
  display: flex;
  gap: 10px;
}
.mr_nameTitle {
  padding-right: 1px;
}
.mr_genderInputWrapper {
  display: flex;
  gap: 40px;
}
.mr_addressInputWrapper {
  display: flex;
  gap: 40px;
}
.mr_prefInputs {
  display: flex;
  flex-direction: column;
}
.mr_prefTitle {
  display: inline-block;
  width: 100px;
  font-size: 14px;
}
.mr_addressInput {
  width: 200px;
}
.mr_title {
  display: inline-block;
  width: 120px;
}
.mr_Input {
  width: 250px;
}
/* 会員情報確認画面 */
.mr_confirmTable {
  padding-bottom: 15px;
}
.mr_confirmTable td,th {
  padding: 15px;
  vertical-align: top;
}
.mr_confirmTable th {
  width: 150px;
  font-weight: normal;
  text-align: left;
}
.mr_confirmTable td {
  word-break: break-all;
}

/* ログイン画面 */
.login_container {
  margin-top: 30px;
  text-align: center;
}
.login_title {
  display: inline-block;
  width: 160px;
}
.login-errors {
  width: 400px;
  padding-bottom: 30px;
  margin: 0 auto;
  color: red;
  font-size: 14px;
}

/* スレッド作成画面 */
.tr_container {
  width: 600px;
  margin: 20px auto;
}
.tr_title {
  display: inline-block;
  width: 140px;
  vertical-align: text-top;
}
.tr_input {
  width: 400px;
}
.tr_textarea {
  width: 400px;
  height: 150px;
}
.tr_label {
  display: flex;
}
/* スレッド作成確認画面 */
.tr_confirmTable {
  padding-bottom: 15px;
}
.tr_confirmTable td,th {
  padding: 15px;
  vertical-align: top;
}
.tr_confirmTable th {
  width: 160px;
  font-weight: normal;
  text-align: left;
  word-break: break-all;
}
.tr_confirmTable td {
  width: 400px;
  word-break: break-all;
}

/* スレッド一覧画面 */
.header_thread {
  justify-content: end;
}
.search_input {
  width: 300px;
  height: 31px;
  padding: 0 5px;
  border: 2px solid #000;
  border-radius: 0px;
}
.search_input:focus {
  border-radius: 0px;
}
input[type="submit"].search_button {
  width: 130px;
  color: #000;
  background-color: #fff;
  border: 2px solid #000;
  border-radius: 0px;
}
input[type="submit"].search_button:hover {
  background-color: #e9e9e9;
}
.search_wrapper {
  margin: 0 auto;
}
.thread_ul {
  list-style-type: none;
  padding: 50px 0;
  color: #0000EE;
}
.thread_ul a {
  text-decoration: none;
}
.thread_ul a:hover {
  text-decoration: underline;
}
.thread_ul a:visited {
  color: #0000EE;
}
.thread_li {
  display: grid;
  grid-template-columns: 50px 1fr 200px;
}
/* スレッド詳細画面 */
.td_title {
  width: 400px;
  margin: 0 auto;
  padding-bottom: 20px;
}
.td_title h2 {
  text-align: center;
}
.td_title_bottom {
  display: flex;
  justify-content: end;
  gap: 30px;
}
.thread_nav {
  width: 100%;
  padding: 0 20px;
  background-color: #d8d8d8;
  display: flex;
  justify-content: space-between;
}
.thread_nav a {
  color: #000;
  text-decoration: none;
}
.disabled{
  color: gray;
}
.thread_contents {
  width: 500px;
  margin: 20px auto;
  color: #0000EE;
  padding: 10px;
  border: 1px solid #0000EE;
  border-radius: 10px;
}
.thread_contents_top {
  display: flex;
  gap: 20px;
  padding-bottom: 5px;
}
.thread_contents_content {
  word-break: break-all;
}
.thread_detail_ol {
  width: 480px;
  margin: 0 auto;
  /* list-style-position: inside; */
  list-style-type: none;
}
.comment_time {
  padding-left: 5px;
}
.thread_detail_comment {
  word-break: break-all;
}
.like_wrapper {
  width: 400px;
  display: flex;
  justify-content: end;
  gap: 5px;
}
.like_wrapper button {
  border: none;
  background-color: rgba(255,255,255,0);
}
.heart {
  width:20px;
  margin-top: 3px;
  cursor: pointer;
}
.comment_form_wrapper {
  width: 480px;
  margin: 20px auto 0;
}
.comment_textarea {
  width: 480px;
  height: 100px;
  border: 2px solid #000;
  border-radius: 0px;
  padding: 5px;
}
.comment_error {
  color: red;
  font-size: 14px;
}
.comment_button_wrapper {
  display: flex;
  justify-content: end;
  margin-top: 5px;
}
input[type="submit"].comment_send_button {
  width: 130px;
}

/* 退会画面 */
.mw_p {
  text-align: center;
  margin-top: 20px;
}
input[type="submit"].mw_submit {
  margin-top: 30px;
  width: 90px;
  padding: 5px 5px;
}

/* 管理画面ログイン */
.mask {
  -webkit-text-security: disc;
}

/* 管理画面トップ */
.admin_main_div {
  margin-top: 50px;
}

/* 会員一覧画面 */
.button_a_member {
  margin-top: 0;
  margin-bottom: 50px;
}
/* 検索フォーム */
.member_search_form {
  margin: 0 auto;
  width: 600px;
}
.member_search_table {
  width: 600px;
  border-collapse: collapse;
  border: 2px solid #000;  
}
.member_search_table tr {
  height: 30px;
}
.member_search_table th {
  width: 200px;
  padding: 12px;
  padding-left: 30px;
  text-align: left;
  border: 1px solid #000;  
  background-color: #D8D8D8;
}
.member_search_table td {
  padding: 10px;
  padding-left: 60px;
  border: 1px solid #000;  
}
.member_search_table input[type="text"] {
  width: 240px;
  height: 30px;
  padding: 5px;
}
.member_search_table input[type="checkbox"] {
  width: 20px;
  height: 20px;
}
.member_search_table select {
  width: 180px;
  height: 30px;
}
.gender_search {
  display: flex;
  gap: 20px;
}
.gender_search_label {
  display: flex;
  align-items: center;
  gap: 5px;
}
.member_search_submit {
  text-align: center;
  margin-top: 20px;
}
input[type="submit"].admin_search_button {
  width: 170px;
  background-color: #fff;
  color: #16305e;
  border: #16305e 1px solid;
}
input[type="submit"].admin_search_button:hover {
  background-color: #e9e9e9;
}
/* 一覧テーブル */
.members_table {
  width: 600px;
  margin-top: 50px;
  margin-bottom: 20px;
  border-collapse: collapse;
  border: 2px solid #000;  
  text-align: center;
  font-size: 14px;
}
.members_table th {
  height: 22px;
  padding: 0;
  border: 1px dotted #000; 
  border-bottom: 1px solid #000;  
  background-color: #D8D8D8;
}
.members_table th a,
.members_table th a:link,
.members_table th a:active,
.members_table th a:hover,
.members_table th a:visited {
  text-decoration: none;
  color: #000;
}
.members_table td {
  padding: 0;  
  border: 1px dotted #000;  
  background-color: #fff;
  word-break: break-all;
}
.members_table .idnum_th {
  width: 40px;
}
.members_table .name_th {
  width: 110px;
}
.members_table .gender_th {
  width: 40px;
}
.members_table .date_th {
  width: 100px;
}
.members_table .edit_detail_th {
  width: 38px;
}
.members_table tr a {
  text-decoration: none;
  color: #0000ee;
}
/* ページャー */
.member_nav {
  width: 220px;
  height: 30px;
  margin-left: 320px;
  display: flex;
  justify-content: space-between;
  text-decoration: none;
  text-align: center;
  color: #000;
}
.pages {
  display: flex;
}
.member_nav a {
  text-decoration: none;
  color: #000;
}
.member_nav .prev_next {
  width: 58px;
  height: 24px;
  border: 1px solid #000;
  background-color: #fff;
}
.member_nav .dummy {
  width: 58px;
  height: 24px;
}
.member_nav .page {
  width: 24px;
  height: 24px;
  border: 1px solid #000;
  background-color: #fff;
}
.member_nav .selected_page {
  background-color: #666;
  color: #fff;
}

/* 会員詳細画面 */
.member_detail_buttons {
  margin: 0 auto 30px;
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: center;
}
.member_detail_buttons .button_a{
  margin-top: 0;
  width: 140px;
  height: 33px;
}
.member_detail_buttons input[type="submit"]{
  margin-top: 0;
  width: 140px;
  height: 33px;
  background-color: #fff;
  color: #16305e;
  border: #16305e 1px solid;
}
.member_detail_buttons input[type="submit"]:hover {
  background-color: #e9e9e9;
}

/* 会員登録・編集テンプレート */
.mr_title_id {
  padding-right: 38px;
}
.admin_submit_button input[type="submit"] {
  margin-top: 20px;
  background-color: #fff;
  color: #16305e;
  border: #16305e 1px solid;
}
.admin_submit_button input[type="submit"]:hover {
  background-color: #e9e9e9;
}