/* 과업 편집 화면 — 공문서 톤에서 벗어난 모바일 입력용 앱 UI (ed- 접두) */

.ed-page {
  min-height: 100dvh;
  background: #F3F3EE;
  padding: 0 0 96px;
}

/* 상단 바 */

.ed-top {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  padding: 14px 16px;
  border-bottom: 1px solid #E4E4DD;
  position: sticky;
  top: 0;
  z-index: 5;
}

.ed-back {
  flex: 0 0 44px;
  height: 44px;
  display: grid;
  place-items: center;
  font-size: 20px;
  color: #171714;
  text-decoration: none;
  border-radius: 12px;
  background: #F3F3EE;
}

.ed-back:active { background: #E7E7E0; }

.ed-top-label {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  color: #C2401F;
}

.ed-top-name {
  margin: 1px 0 0;
  font-size: 16px;
  font-weight: 700;
  color: #171714;
  line-height: 1.3;
}

/* 폼 레이아웃 */

.ed-form {
  max-width: 560px;
  margin: 0 auto;
  padding: 14px 14px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ed-card {
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.ed-card-title {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 700;
  color: #171714;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.ed-hint {
  margin: 10px 0 0;
  font-size: 12.5px;
  color: #8A8A82;
}

/* 진행 상태 — 세그먼트 */

.ed-seg {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.ed-seg input { position: absolute; opacity: 0; pointer-events: none; }

.ed-seg-item {
  display: grid;
  place-items: center;
  height: 46px;
  border-radius: 12px;
  border: 1.5px solid #E4E4DD;
  font-size: 14.5px;
  font-weight: 600;
  color: #5B5B54;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.ed-seg input:checked + .ed-seg-item {
  background: #171714;
  border-color: #171714;
  color: #fff;
}

.ed-seg input:focus-visible + .ed-seg-item {
  outline: 2px solid #C2401F;
  outline-offset: 2px;
}

/* 진행률 슬라이더 */

.ed-pct {
  font-size: 22px;
  font-weight: 800;
  color: #C2401F;
  font-variant-numeric: tabular-nums;
}

.ed-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 34px;
  background: transparent;
  margin: 2px 0 0;
}

.ed-range::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 4px;
  background: #ECECE6;
}

.ed-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #C2401F;
  border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  margin-top: -10px;
}

.ed-range::-moz-range-track {
  height: 8px;
  border-radius: 4px;
  background: #ECECE6;
}

.ed-range::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #C2401F;
  border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.ed-range:focus-visible { outline: 2px solid #C2401F; outline-offset: 4px; }

.ed-range-scale {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #A9A9A0;
  font-variant-numeric: tabular-nums;
}

/* 입력 필드 */

.ed-input {
  width: 100%;
  border: 1.5px solid #E4E4DD;
  border-radius: 12px;
  padding: 12px 14px;
  font-family: inherit;
  font-size: 16px;   /* iOS 자동 줌 방지 */
  line-height: 1.5;
  color: #171714;
  background: #FBFBF8;
  resize: vertical;
}

.ed-input::placeholder { color: #A9A9A0; }

.ed-input:focus {
  outline: none;
  border-color: #171714;
  background: #fff;
}

/* 항목 리스트 편집 */

.ed-items { display: flex; flex-direction: column; gap: 8px; }

.ed-item {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.ed-item .ed-input { flex: 1; }

.ed-del {
  flex: 0 0 44px;
  border: 0;
  border-radius: 12px;
  background: #F3F3EE;
  color: #8A8A82;
  font-size: 15px;
  cursor: pointer;
}

.ed-del:active { background: #E7E7E0; color: #C2401F; }

.ed-add {
  margin-top: 10px;
  width: 100%;
  height: 46px;
  border: 1.5px dashed #C9C9C1;
  border-radius: 12px;
  background: transparent;
  font-size: 14.5px;
  font-weight: 600;
  color: #5B5B54;
  cursor: pointer;
}

.ed-add:active { background: #ECECE6; }

/* 이슈 카드 강조 */

.ed-card-issue { border: 1.5px solid rgba(194, 64, 31, 0.35); }
.ed-card-issue .ed-card-title { color: #C2401F; }

/* 하단 고정 저장 바 */

.ed-savebar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: flex;
  gap: 10px;
  padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(6px);
  border-top: 1px solid #E4E4DD;
}

.ed-savebar > * { max-width: 560px; }

.ed-cancel {
  flex: 0 0 96px;
  display: grid;
  place-items: center;
  height: 52px;
  border-radius: 14px;
  background: #F3F3EE;
  color: #5B5B54;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
}

.ed-save {
  flex: 1;
  height: 52px;
  border: 0;
  border-radius: 14px;
  background: #C2401F;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.02em;
}

.ed-save:active { background: #A83518; }

.ed-cancel:focus-visible,
.ed-save:focus-visible {
  outline: 2px solid #171714;
  outline-offset: 2px;
}

@media (min-width: 600px) {
  .ed-savebar { justify-content: center; }
  .ed-save { flex: 0 1 464px; }
}
