/* COMMON */
:root {
  --main-color: #F97316;
  --bg-color: #fafaf9;
}

body {
  background: var(--bg-color);
}

#wrap {
  margin-bottom: 7.9rem;
}

.inner {
  width: 100%;
  padding: 0 2.4rem;
  margin: 0 auto;
}

main {
  margin-top: 9.2rem;
  padding-bottom: 4rem;
}

/* HEADER */
header {
  text-align: center;
  padding: 2rem 0;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 99;
  width: 100%;
  background: var(--bg-color);
}
header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
header h1 {
  font-family: 'Gosan';
  font-size: 2.5rem;
  line-height: 4rem;
  white-space: nowrap;
}
header a {
  display: block;
}
header a img {
  width: 3rem;
}

/* FOOTER */
footer {
  width: 100%;
  position: fixed;
  bottom: 0;
  left: 0;
  z-index: 999;
  border-top: 1px solid #292524;
  background: var(--bg-color);
}
footer ul {
  display: flex;
  justify-content: space-evenly;
  gap: 2rem;
}
footer ul li a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .8rem;
  padding: 1.3rem 0;
}
footer ul li a img {
  width: 3rem;
  aspect-ratio: 1 / 1;
}
footer ul li a p {
  font-size: 1.4rem;
  font-weight: 600;
  color: #78716C;
  white-space: nowrap;
}
footer ul li.active a p {
  color: #292524;
}

/* index.php */
.home {
  margin-top: 3rem;
}
.home .header_wrap {
  margin-bottom: 3rem;
}
.home .header_wrap h1 {
  font-family: 'Gosan';
  font-size: 2.8rem;
  line-height: 4rem; 
}
.home .header_wrap h1 b {
  color: var(--main-color);
}
.home .gallery_wrap {
  background: var(--main-color);
  border-radius: 2rem;
  padding: 2.5rem 0;
  text-align: center;
  margin-bottom: 4rem;
}
.home .gallery_wrap img {
  width: 5.6rem;
  margin-bottom: 1rem;
}
.home .gallery_wrap p {
  font-size: 1.8rem;
  font-weight: 600;
  color: #fff;
}
.home .today_wrap h2 {
  font-family: 'Gosan';
  font-size: 2rem;
  margin-bottom: 1.6rem;
}
.home .today_wrap .box a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0px 0px 6px 0px #0000001A;
  background: #fff;
  padding: 2rem;
  border-radius: 2rem;
  margin-bottom: 1rem;
}
.home .today_wrap .box h3 {
  font-size: 1.6rem;
  font-weight: 600;
}
.home .today_wrap .box p {
  font-size: 1.6rem;
  font-weight: 600;
}
.home .today_wrap .box p b {
  font-size: 2rem;
  font-weight: 700;
  color: var(--main-color);
}
.home .recent {
  display: block;
  box-shadow: 0px 0px 6px 0px #0000001A;
  background: #fff;
  padding: 2rem;
  border-radius: 2rem;
}
.home .recent .title_box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}
.home .recent .title_box h3 {
  font-size: 1.6rem;
  font-weight: 600;
}
.home .recent .title_box img {
  width: 2rem; 
}
.home .recent .list_box ul {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.home .recent .list_box ul li {
  font-size: 1.4rem;
  color: #78716C;
}

/* gallery.php */
.gallery .inner {
  min-height: calc(100dvh - 21.2rem);
  display: flex;
  flex-direction: column;
  gap: 3rem;
}
.gallery .list_wrap ul {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}
.gallery .list_wrap ul li {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.gallery .list_wrap ul li img {
  width: 3.6rem;
}
.gallery .list_wrap ul li .info_wrap p {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: .6rem;
}
.gallery .list_wrap ul li .info_wrap span {
  display: block;
  font-size: 1.4rem;
  line-height: 2rem;
  color: #78716C;
  word-break: keep-all;
}
.gallery .btn_wrap {
  margin-top: auto;
}
.gallery .btn_wrap button {
  display: block;
  width: 100%;
  background: var(--main-color);
  font-size: 1.8rem;
  font-weight: 600;
  text-align: center;
  padding: 2.6rem 0;
  border-radius: 2rem;
  color: #fff;
}

/* result.php */
.result .img_wrap {
  height: 40rem;
  background: #E7E5E4;
}
.result .img_wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.result .content_wrap {
  padding: 4rem 0 0;
  border-radius: 2rem 2rem 0 0;
  box-shadow: 0px -6px 8px 0px #0000001A;
  background: var(--bg-color);
  position: relative;
  top: -1.5rem;
}
.result .content_wrap .info_box {
  margin-bottom: 2.5rem;
}
.result .content_wrap .info_box .title {
  display: block;
  font-size: 1.4rem;
  color: #78716C;
  margin-bottom: 1rem;
}
.result .content_wrap .info_box .name_box {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
}
.result .content_wrap .info_box .name_box .food_info p {
  display: inline;
  font-size: 1.8rem;
  font-weight: 600;
  line-height: 1.3;
  word-break: break-word;
}
.result .content_wrap .info_box .name_box .amount_wrap {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}
.result .content_wrap .info_box .name_box .amount_wrap button img {
  width: 2.4rem;
}
.result .content_wrap .info_box .name_box .amount_wrap p {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--main-color);
}
.result .content_wrap .info_box .calorie {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--main-color);
}
.result .content_wrap .info_box ul {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .8rem;
}
.result .content_wrap .info_box ul li {
  display: flex;
  flex-direction: column;
  gap: 2.2rem;
  padding: 2rem;
  background: #fff;
  border-radius: 2rem;
  box-shadow: 0px 0px 6px 0px #0000001A;
}
.result .content_wrap .info_box ul li span {
  display: block;
  font-size: 1.6rem;
  font-weight: 500;
  color: #78716C;
}
.result .content_wrap .info_box ul li p {
  margin-left: auto;
  font-size: 1.8rem;
  font-weight: 600;
}
.result .content_wrap .info_box .modify {
  display: block;
  width: 100%;
  background: #fff;
  border-radius: 2rem;
  box-shadow: 0px 0px 6px 0px #0000001A;
  text-align: center;
  font-size: 1.8rem;
  font-weight: 600;
  padding: 1.6rem 0;
}
.result .content_wrap .btn_wrap {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.result .content_wrap .btn_wrap button,
.result .content_wrap .btn_wrap a {
  display: block;
  width: 100%;
  padding: 2.6rem 0;
  border-radius: 2rem;
  text-align: center;
  border: 1px solid var(--main-color);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--main-color);
  background: #fff;
}
.result .content_wrap .btn_wrap .register {
  background: var(--main-color);
  color: #fff;
}
.result .content_wrap .notice_wrap {
  margin-top: 4rem;
}
.result .content_wrap .notice_wrap p {
  font-size: 1.4rem;
  line-height: 2rem;
  color: #78716C;
  text-align: center;
  word-break: keep-all;
}

/* list.php */
.list .title_wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}
.list .title_wrap h2 {
  font-size: 2rem;
  font-weight: 600; 
}
.list .title_wrap p {
  font-size: 2rem;
  font-weight: 600;
}
.list .title_wrap p b {
  font-size: 3.2rem;
  font-weight: 700;
  color: var(--main-color);
}
.list .list_wrap > ul {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.list .list_wrap > ul > li {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  background: #fff;
  box-shadow: 0px 0px 6px 0px #0000001A;
  border-radius: 2rem;
  padding: 2.4rem 2rem;
}
.list .list_wrap .food_wrap .title_box {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 2rem;
}
.list .list_wrap .food_wrap .title_box h3 {
  font-size: 1.6rem;
  font-weight: 600;
}
.list .list_wrap .food_wrap .title_box button img {
  width: 1.6rem;
}
.list .list_wrap .food_wrap .food_list_wrap ul {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.list .list_wrap .food_wrap .food_list_wrap ul li p {
  display: inline;
  font-size: 1.4rem;
  color: #78716C;
}
.list .list_wrap .calorie_wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.list .list_wrap .calorie_wrap .img_wrap {
  width: 6.2rem;
  height: 6.2rem;
  border-radius: 2rem;
  overflow: hidden;
  margin-bottom: 2.4rem;
  background: #E7E5E4;
}
.list .list_wrap .calorie_wrap .img_wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.list .list_wrap .calorie_wrap .total {
  font-size: 1.6rem;
  font-weight: 600;
}
.list .list_wrap .calorie_wrap .total b {
  font-size: 2rem;
  font-weight: 700;
  color: var(--main-color);
}
.list .btn_wrap {
  margin-top: 4rem;
}
.list .btn_wrap a {
  display: block;
  width: 100%;
  font-size: 1.8rem;
  font-weight: 600;
  text-align: center;
  border-radius: 2rem;
  background: var(--main-color);
  color: #fff;
  padding: 2.6rem 0;
}

/* calendar.php */
.calendar .calendar_wrap {
  margin-top: 4rem;
}
.calendar .calendar_wrap .day_wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #E7E5E4;
  padding-bottom: 1.6rem;
}
.calendar .calendar_wrap .day_wrap button img {
  width: 2.4rem;
}
.calendar .calendar_wrap .day_wrap p {
  font-size: 2rem;
  font-weight: 700;
  color: var(--main-color);
}
.calendar .calendar_wrap .table_wrap {
  padding: 1.2rem 0;
}
.calendar .calendar_wrap .table_wrap table {
  width: 100%;
}
.calendar .calendar_wrap .table_wrap table thead {
  display: flex;
  margin-bottom: 1.6rem;
}
.calendar .calendar_wrap .table_wrap table thead tr {
  display: flex;
  justify-content: space-between;
  width: 100%;
}
.calendar .calendar_wrap .table_wrap table thead th {
  font-size: 1.2rem;
  font-weight: 500;
  width: 3.8rem;
}
.calendar .calendar_wrap .table_wrap table tbody {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.calendar .calendar_wrap .table_wrap table tbody tr {
  display: flex;
  justify-content: space-between;
  width: 100%;
}
.calendar .calendar_wrap .table_wrap table tbody td {
  text-align: center;
  font-size: 1.8rem;
  font-weight: 500;
  width: 3.8rem;
  height: 4.2rem;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.calendar .calendar_wrap .table_wrap table tbody td.food::after {
  content: "";
  width: .8rem;
  height: .8rem;
  border-radius: 100%;
  background: var(--main-color);
  position: absolute;
  bottom: -1.2rem;
  left: 50%;
  transform: translateX(-50%);
}
.calendar .calendar_wrap .table_wrap table tbody td.today {
  color: var(--main-color);
  border: 1px solid var(--main-color);
  border-radius: .5rem;
}
.calendar .btn_wrap {
  margin-top: 4rem;
}
.calendar .btn_wrap a {
  display: block;
  width: 100%;
  font-size: 1.8rem;
  font-weight: 600;
  text-align: center;
  border-radius: 2rem;
  background: var(--main-color);
  color: #fff;
  padding: 2.6rem 0;
}



.modal_dim {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, .4);
  z-index: 99;
}
.modal_dim.active {
  display: block;
}
.modal_wrap {
  display: none;
  background: #fff;
  box-shadow: 0px -6px 8px 0px #0000001A;
  border-radius: 2rem 2rem 0 0;
  position: fixed;
  bottom: 7.9rem;
  left: 0;
  width: 100%;
  padding: 2.4rem;
  z-index: 99;
}
.modal_wrap.active {
  display: block;
}
.modal_wrap .title_wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
}
.modal_wrap .title_wrap h2 {
  font-size: 2rem;
  font-weight: 600;
}
.modal_wrap .title_wrap img {
  width: 3rem;
}
.modal_wrap .meal_swiper {
  padding: .8rem .6rem;
}
.modal_wrap .meal_swiper .swiper-wrapper {
  align-items: stretch;
  height: auto !important;
}
.modal_wrap .meal_swiper .swiper-slide {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  box-shadow: 0px 0px 6px 0px #0000001A;
  padding: 2.4rem 2rem;
  border-radius: 2rem;
  height: auto;
}
.modal_wrap .food_wrap .title_box {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1.8rem;
}
.modal_wrap .food_wrap .title_box h3 {
  font-size: 1.6rem;
  font-weight: 600;
}
.modal_wrap .food_wrap .title_box button img {
  width: 1.6rem;
}
.modal_wrap .food_wrap .food_list_wrap ul {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.modal_wrap .food_wrap .food_list_wrap ul li p {
  display: inline;
  font-size: 1.4rem;
  color: #78716C;
  line-height: 1.3;
}
.modal_wrap .calorie_wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}
.modal_wrap .calorie_wrap .img_wrap {
  width: 6.2rem;
  height: 6.2rem;
  border-radius: 2rem;
  overflow: hidden;
  margin-bottom: 2.4rem;
  background: #E7E5E4;
}
.modal_wrap .calorie_wrap .img_wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.modal_wrap .calorie_wrap .total {
  font-size: 1.6rem;
  font-weight: 600;
}
.modal_wrap .calorie_wrap .total b {
  font-size: 2rem;
  font-weight: 700;
  color: var(--main-color);
}

/* 음식명 검색 모달 (result.php) */
.search_modal .search_wrap {
  margin-bottom: 1.6rem;
}
.search_modal .search_wrap input {
  width: 100%;
  font-size: 1.6rem;
  border: 1px solid #E7E5E4;
  border-radius: 1.2rem;
  padding: 1.6rem;
  background: #fff;
}
.search_modal .search_wrap input:focus {
  outline: none;
  border-color: var(--main-color);
}
.search_modal #food_result {
  max-height: 32rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: .4rem;
}
.search_modal #food_result li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem 1.2rem;
  border-radius: 1rem;
  cursor: pointer;
  box-shadow: none;
}
.search_modal #food_result li:active {
  background: #F5F5F4;
}
.search_modal #food_result li span {
  font-size: 1.6rem;
  font-weight: 500;
}
.search_modal #food_result li em {
  font-size: 1.2rem;
  font-style: normal;
  color: #A8A29E;
}
.search_modal #food_result li.empty {
  justify-content: center;
  font-size: 1.4rem;
  color: #A8A29E;
  cursor: default;
  padding: 1.6rem 0;
}

/* 기록 없음 */
.empty_box {
  display: block !important;
  text-align: center;
  font-size: 1.4rem;
  color: #A8A29E;
  padding: 4rem 0 !important;
  box-shadow: none !important;
}

/* 기록 삭제 버튼 */
.food_list_wrap ul li .del {
  display: none;
  margin-left: .6rem;
  width: 2rem;
  height: 2rem;
  line-height: 1;
  font-size: 1.6rem;
  color: #A8A29E;
  border: 1px solid #E7E5E4;
  border-radius: 100%;
  background: #fff;
  vertical-align: middle;
}
li.editing .food_list_wrap ul li .del {
  display: inline-block;
}

/* info.php */
.info ul {
  display: flex;
  flex-direction: column;
  gap: 1.6rem; 
}
.info ul li {
  background: #fff;
  border-radius: 1.6rem;
  padding: 2rem;
}
.info ul li .title_wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
}
.info ul li .title_wrap h2 {
  font-size: 2rem;
  font-weight: 600;
}
.info ul li .title_wrap img {
  width: 2.4rem;
  transform: rotate(180deg);
  transition: transform 0.3s;
}
.info ul li.on .title_wrap img {
  transform: rotate(0deg);
}
.info ul li .content_wrap {
  display: none;
  margin-top: 2rem;
}
.info ul li .content_wrap p {
  font-size: 1.4rem;
  color: #78716C;
  line-height: 2.3rem;
}