html, body {
  height: 100%;
  overflow: hidden; /* html/body 스크롤 모두 잠금 */
  overscroll-behavior: none; /* 모바일 바운스/오버스크롤 완화 */
}

body {
  margin: 0;
  font-family: 'Noto Sans KR', sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 320px;
  color: #333;
  background-color: #F7F8FA;
  height: 100vh; /* fallback */
}

/* 링크 컬러 */
a, a:visited {
  color: #F74354;
}
a:hover, a:active {
  color: #F74354;
}

/* 메인 스타일 */
.container {
  position: relative;
  width: 100%;
  text-align: center;
  padding: 0;
  height: 100vh; /* fallback */
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* 모바일 주소창 등으로 100vh가 어긋나는 문제 방지 */
@supports (height: 100dvh) {
  body {
    height: 100dvh;
  }
  .container {
    height: 100dvh;
  }
}

.header {
  position: relative; /* 상단 영역만큼 자연스럽게 공간을 차지하게 */
  width: 100%;
  box-sizing: border-box;
  padding: 40px 25px 35px;
  color: white;
  background: linear-gradient(to bottom right, #F8C255, #F74354);
  background: linear-gradient(270deg, #F74354 25%, rgba(240, 200, 112, 0.95) 100%);
  border-bottom-left-radius: 50% 50%;
  border-bottom-right-radius: 50% 50%;
}

.header h2 {
  margin: 8px 0;
  font-size: 16px;
  font-weight: 400;
}

.header h1 {
  font-size: 30px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.05em;
}

.highlight {
  color: #FFEB3B;
}

.content {
  position: relative;
  margin: 0 20px;
  flex: 1 1 auto;           /* 헤더를 제외한 나머지 높이 채우기 */
  min-height: 0;            /* flex overflow 이슈 방지 */
  display: flex;
  flex-direction: column;
}

.input-box {
  background: #FFECEC;
  border-radius: 12px;
  padding: 16px;
  margin-top: 20px;
  text-align: center;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  flex: 1 1 auto;           /* 작성창 영역이 남은 공간을 차지 */
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.input-box textarea {
  width: 100%;
  min-height: 0;
  border: none;
  background: transparent;
  resize: none;
  font-size: 14px;
  font-family: 'Noto Sans KR', sans-serif;
  outline: none;
  color: #666;
  flex: 1 1 auto;           /* 작성창을 남은 높이에 맞춤 */
}

.input-box textarea::placeholder {
  color: #D3A6A6;
}

.btn {
  background: #333;
  color: #fff;
  padding: 14px 0;
  border-radius: 25px;
  border: none;
  width: 92%;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
}

.btn:hover {
  background: #F74354;
}

.btn_group {
  margin-top: 12px;
  padding-bottom: 20px;
  flex: 0 0 auto;
} 

.setting-btn {
  background: #fff;
  padding: 16px 30px;
  border-radius: 12px;
  margin-top: 15px;
  font-size: 15px;
  text-align: left;
  border: none;
  width: 100%;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  cursor: pointer;
}

.setting-btn span {
  float: right;
  color: #C6C6C6;
}

/* index.php 권한 설정 버튼(40-42) 텍스트 컬러를 붉은색으로 */
#open-ios-setting,
#open-android-setting,
#open-general-setting {
  color: #F74354;
}

#open-ios-setting span,
#open-android-setting span {
  color: #F74354;
}

/* 블랙 레이어 */
#dimmed {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgb(0 0 0 / 60%);
}


/* 팝업 스타일 */
.popup_container {
  position: fixed;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 100%;
  height: 100%;
  margin-bottom: 50px;
}
.popup_wrap {
  background: #fff;
  border-radius: 18px;
  margin: 0 20px 34px;
  padding: 20px 20px 4px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.handle-bar {
  width: 40px;
  height: 4px;
  background: #ddd;
  border-radius: 3px;
  margin: -4px auto 28px;
}

.card {
  background: #F8475A;
  color: #fff;
  border-radius: 16px;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-align: left;
  margin-bottom: 15px;
}

.card-text {
  flex: 1;
  margin-right: 15px;
}

.card-text h3 {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.card-text p {
  margin: 0;
  font-size: 13px;
  color: #FDACC5;
  opacity: 0.9;
  letter-spacing: -0.02em;
}

.card-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.card-buttons button {
  background: rgba(255, 255, 255, 0.25);
  border: none;
  border-radius: 8px;
  padding: 5px 8px;
  cursor: pointer;
}

.card-buttons button:nth-child(even) {
  background: rgba(253, 199, 204, 0.75);
}

.card-buttons button img {
  width: 24px;
  height: 24px;
  vertical-align: middle;
}

  /* 팝업용 추가 스타일 */
    #dimmed {
      position: fixed;
      top: 0; left: 0;
      width: 100%; height: 100%;
      background: rgba(0,0,0,0.5);
      z-index: 999;
      display: none;
    }
    .popup_container {
      position: fixed;
      bottom: 0;
      left: 0;
      width: 100%;
      max-height: 80%;
      background: transparent;
      z-index: 1000;
      display: none;
      overflow-y: auto;
    }
    .popup_wrap {
      padding: 20px;
    }
    .popup_header {
      position: sticky;
      top: 0;
      background: transparent;
      padding-bottom: 10px;
      border-bottom: 1px solid #ddd;
    }
    .popup_header button {
      background: none;
      border: none;
      font-size: 16px;
      color: #0c99da;
      cursor: pointer;
    }
    .handle-bar {
      width: 40px;
      height: 4px;
      background: #ccc;
      border-radius: 2px;
      margin: 0 auto 16px;
    }
    .card {
      background: #F8475A;
      color: white;
      padding: 16px;
      border-radius: 12px;
      margin-bottom: 15px;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    .card-text {
      flex: 1;
    }
    .card-text h3 {
      margin: 0 0 10px;
      font-size: 16px;
    }
    .card-text p {
      margin: 0;
      font-size: 14px;
      color: #ffdede;
    }
    .card-buttons {
      display: flex;
      flex-direction: column;
      gap: 6px;
      margin-left: 12px;
    }
    .card-buttons button {
      background: rgba(255,255,255,0.2);
      border: none;
      padding: 6px;
      border-radius: 6px;
      cursor: pointer;
    }
    .card-buttons img {
      width: 20px;
      height: 20px;
    }
     .popup_container {
    transition: transform 0.25s ease;
    transform: translateY(0);
  }

  .popup_container.dragging {
    transition: none;
  }