*380At a special hearing, the juvenile court issued a permanent restraining order prohibiting the child's stepfather from having any contact with the child. ( Welf. & Inst. Code, § 213.5.)1 The child's mother, E.S., appeals from an order of the juvenile court issued at the same hearing, directing the San Diego County Health and Human Services Agency (Agency) to immediately remove her child from her care if there is "any evidence that the minor has been exposed to [his stepfather] or if mother violates the restraining order." We reverse the order.
*895FACTUAL AND PROCEDURAL BACKGROUND
C.M., who is now eight years old, is the son of E.S. and C.M., Sr.2 In January 2016, E.S. married K.K. E.S. knew that K.K. had a history of domestic violence in another relationship and had completed a domestic violence treatment program. During the first year of their marriage, there were four incidents of domestic violence between E.S. and K.K. During one of those incidents, K.K. hit E.S. in the face, giving her two black eyes. C.M. was present during another incident.
On January 7, 2017, K.K. pushed E.S. and hit her in the face, sprayed bleach on C.M., poured bleach on a pile of their clothes, and threw a bottle of bleach at E.S. E.S. locked herself and C.M. in the bathroom, and telephoned the police. Police officers arrested K.K. Officers reported E.S. had minor bruising on her cheek. There were visible signs of a struggle in the home. Paintings had fallen off the wall. There was a clear liquid that smelled like bleach outside the bathroom where E.S. and C.M. had been hiding. C.M. said his stepfather had punched him in the stomach on several occasions, and once on his back. E.S. was not present when K.K. hit him.
On January 17, 2017, the Agency filed a two-count petition alleging seven-year-old C.M. had suffered, or was at substantial risk of suffering, serious physical harm or illness as a result of physical abuse by his stepfather K.K., domestic violence between E.S. and K.K., and E.S.'s failure or inability to adequately protect C.M. (§ 300, subd. (b).)
*381In an interview with a social worker, when asked about the white spots that were all over his pants and shirt, C.M. said K.K. sprayed bleach on him. C.M. mimed the use of a spray bottle. He said the bleach "touched my eyes and it started to burn." K.K. also poured bleach on a pile of C.M.'s and E.S.'s clothes. C.M. did not see his stepfather hit his mother but heard him yelling at her. C.M. said he felt safe in the home "but only with my mom." His stepfather would "get in my mom's face and yell at her and me." When C.M. heard fighting sounds that scared him, he would stay in his room. He was scared when he saw bruises on his mother's arms.
E.S. said K.K. complained she did not pay attention to the family and intentionally broke her fan on the evening of January 6. When K.K. became angry, he destroyed her property. He previously had destroyed five other fans and her phone. K.K. grabbed her by the arms and held her down on the bed. C.M. was in his bedroom during this altercation. The next day, K.K. took her food stamp card to buy food for a party with his friends. E.S. started throwing the party food in the trash. K.K. hit her on the side of her face. He then obtained a knife and tried to cut her shoe with it. K.K. poured bleach on a pile of her clothes. Her eyes were burning. E.S. did not know whether K.K. sprayed bleach directly at C.M. She felt badly about the incident because it scared her son.
After his arrest, K.K. returned home. E.S. was reluctant to leave. She was a stay-at-home wife and mother, and just had learned she was two months pregnant. The social worker explained to E.S. that she had failed to protect C.M. by remaining in an abusive relationship. After discussing the issue for six hours, E.S. agreed to leave the home. She and C.M. moved in with relatives. E.S. said she did not want *896her son to feel scared or be at any risk of harm, and she planned to divorce K.K. She changed C.M.'s school because his old school was close to K.K.'s home and she did not want her son to feel scared.
At the detention hearing, the juvenile court detained C.M. with E.S. on condition she reside with a family member or in a domestic violence shelter, enroll in a domestic violence prevention program, obtain counseling for C.M., not use corporal punishment to discipline C.M., and to comply with all court orders. The court issued a temporary restraining order protecting C.M. from K.K. The minute order states: "If mother violates the conditions of detention, the minor is to be removed from her care."
The jurisdictional and dispositional hearing was held on February 8. The social worker said C.M. was happy in his mother's care and liked being with his family. The maternal relatives provided a strong safety network. E.S. was abiding by the temporary restraining order and had not permitted K.K. to have any contact with C.M.
*382The court found that C.M.'s placement with his mother would not be detrimental to him provided she complied with the conditions set by the court. These conditions included compliance with the case plan, not allowing the stepfather to have any contact with C.M., not violating the restraining order, meeting C.M.'s educational, medical, dental and service needs, and making C.M. available to minor's counsel or investigator. The court ordered the Agency to immediately set a special hearing if E.S. disengaged in services. The court set a special hearing on issuing a permanent restraining order.3
On March 3, at the hearing on the restraining order, E.S. acknowledged she and K.K. had engaged in physical altercations. She denied he ever hit C.M. in the stomach. She acknowledged K.K. had destroyed her property, including six fans, a television and a cell phone. He tried to cut her shoe with a "skinny kitchen knife" but did not damage the shoe. During the January 7 incident, she and C.M. had to sit in some of the bleach and their eyes were burning. C.M.'s clothes were spotted with bleach because E.S. touched him when they moved to the bathroom.
E.S. testified she never sought a restraining order against K.K. because he did not pose a threat to her. E.S. believed C.M. was safe in K.K.'s presence. She planned to stay married to K.K., but not if it meant C.M. could be removed from her care. C.M. was always excited to see K.K. They enjoyed sports, wrestling and bike riding together. They had a happy relationship.
The social worker testified when she interviewed C.M. on January 31, C.M. was afraid of his stepfather. C.M. felt safe at his relatives' houses and was happy his mom was there. In describing the January 7 incident, C.M. said he was in his room and heard yelling and screaming and things being thrown around. His mother called him and they went into the bathroom. K.K. sprayed them with bleach. The social worker expressed doubts about *897E.S.'s ability to protect C.M. from his stepfather. She recommend the court issue a permanent restraining order prohibiting K.K. from having any contact with C.M. *383K.K. denied ever physically abusing C.M. C.M. called him "Pops." He considered himself to be C.M.'s father. C.M. did not witness the confrontation between him and E.S. on January 7. K.K. completed a 52-week domestic violence program after a domestic violence incident in January 2011.
The court found, by clear and convincing evidence, there was domestic violence between K.K. and E.S. in C.M.'s presence. C.M. was clearly impacted by the significant and escalating violence in the home, including the use of bleach, which has the capacity to permanently maim and injure a person. K.K. used a knife during the confrontation. E.S. minimized his use of a weapon. The court was concerned because K.K. had completed a 52-week domestic violence treatment program and was still engaging in violent activity.
The court issued a permanent restraining order without prejudice, stating it would reconsider its order if E.S. and K.K. mitigated the risk to C.M. through services. The court said, "I do want to make it perfectly clear to the mother and all family members that they must enforce this order. You cannot cause [K.K.] to violate the order, and you must be protective of [C.M.]. [¶] I am directing the Agency, if they receive evidence that [C.M.] has been exposed to [K.K.], and mother has permitted [K.K.] to violate the order, or put [C.M.] in a circumstance where [K.K.] has violated the order, you are to immediately remove him from her care and put the matter back on immediately in this courtroom. [¶] I consider the risk to be very, very high." The court said C.M. would be immediately removed from the mother and it might affect the relatives' ability to serve as caregivers or visit C.M.
The minute order states: "If the Agency receives any evidence that the minor has been exposed to [K.K.] or if mother violates the restraining order, the minor is to be immediately removed from mother's care and this matter is to be put back on calendar immediately."4
DISCUSSION
A
THE PARTIES' ARGUMENTS
Characterizing the conditional removal order as a portion of the restraining order, E.S. contends she did not receive notice she would be a restrained party, and therefore the written minute order is constitutionally and statutorily invalid. She argues the juvenile court abused its discretion in altering the *384procedures and evidentiary standards for removal of C.M. from her care. In so arguing, E.S. assumes the conditional removal order is an order for removal under section 361, subdivision (c), which requires the court to find, by clear and convincing evidence, there is, or would be, a substantial danger to the physical health, safety, protection, or physical or emotional well-being of the child, and there are no reasonable means by which the child's physical health can be protected without removing the child from the parent (detriment finding).
The Agency contends the appeal does not present a justiciable issue and E.S. has forfeited her claims of error by failing to object at trial. On the merits, the Agency characterizes the conditional removal order as a "detention warning." The Agency argues the order was lawfully issued pursuant to the court's authority to impose conditions on C.M.'s placement with his *898mother under sections 361, subdivision (a)(1) and 362, subdivision (a), and therefore the court is not required to make a detriment finding to effect removal. The Agency asserts the juvenile court did not abuse its discretion in issuing the order (or, alternatively, any error was harmless) in view of the extreme risk of harm K.K. posed to C.M.
B
RIPENESS
The Agency contends the appeal should be dismissed because the issue is not ripe for review. "[T]he ripeness requirement prevents courts from issuing purely advisory opinions, or considering a hypothetical state of facts to give general guidance rather than to resolve a specific legal dispute." ( Hunt v. Superior Court (1999) 21 Cal.4th 984, 998, 90 Cal.Rptr.2d 236, 987 P.2d 705 ( Hunt ).) The Agency argues it is purely hypothetical to assume C.M. will be detained prior to any hearing to assess the risk to him in his mother's care, and asserts E.S.'s due process rights would be abridged only if C.M. were in fact illegally detained.
E.S. states her appeal is directed at the terms of a restraining order under section 213.5. She contends a challenge to a restraining order issued in a juvenile dependency proceeding is "subject to review on direct appeal from the order granting the restraining order." ( In re Cassandra B . (2004) 125 Cal.App.4th 199, 208, 22 Cal.Rptr.3d 686.)
The Agency's argument about ripeness is based on its characterization of the court's removal order as a "detention warning" and the implicit suggestion the Agency would follow its usual procedures in assessing risk to a child. The plain terms of the court's conditional removal order require the *385Agency to remove C.M. from his home on "any evidence" of exposure to his stepfather or violation of the restraining order by his mother. The order requires no further judicial finding. "The fact that a judgment is conditional does not prevent it from being a final, appealable judgment if, so far as the condition is concerned, the order is self-executing and requires no further judicial act." ( Taper v. City of Long Beach (1982) 129 Cal.App.3d 590, 606, 181 Cal.Rptr. 169.)
Further, the requirement for ripeness does not prevent a reviewing court from resolving a concrete dispute if the consequence of a deferred decision is lingering uncertainty and additional, lengthy appellate proceedings. ( Hunt , supra , 21 Cal.4th at pp. 998-999, 90 Cal.Rptr.2d 236, 987 P.2d 705.) Here, removal of the child from his home on "any evidence" of exposure to his stepfather or violation of the restraining order would result in additional, lengthy appellate proceedings. Accordingly, the issue whether the court's order is valid is ripe for review.
C
FORFEITURE
"A party forfeits the right to claim error as grounds for reversal on appeal when he or she fails to raise the objection in the trial court. [Citations.] Forfeiture, also referred to as 'waiver,' applies in juvenile dependency litigation and is intended to prevent a party from standing by silently until the conclusion of the proceedings." ( In re Dakota H. (2005) 132 Cal.App.4th 212, 221, 33 Cal.Rptr.3d 337 ( Dakota H . ).) A party may not assert theories on appeal which were not raised in the trial court. ( *899Fretland v. County of Humboldt (1999) 69 Cal.App.4th 1478, 1489, 82 Cal.Rptr.2d 359.)
E.S. acknowledges she did not raise in the trial court her assertions the conditional removal order violated her due process rights and did not comport with the statutory scheme. She argues she may raise a new theory on appeal because the controversies present a pure issue of law. (See Dakota H., supra, 132 Cal.App.4th at pp. 221-222, 33 Cal.Rptr.3d 337.)
Application of the forfeiture rule is not automatic. ( In re S.B. (2004) 32 Cal.4th 1287, 1293, 13 Cal.Rptr.3d 786, 90 P.3d 746.) The appellate court's discretion to excuse forfeiture should be exercised rarely and only in cases presenting an important legal issue. ( Ibid . ) In dependency cases, because the proceedings involve the well-being of children, considerations such as permanency and stability are of paramount importance. ( Ibid . ) Here, the juvenile court applied a different standard and burden of proof, thus altering the statutory framework that governs detention or removal of a dependent child *386under the California dependency scheme. There is no dispute about the standards and procedures that were employed by the court. When the facts are not disputed, the effect or legal significance of those facts is a question of law. ( Ghirardo v. Antonioli (1994) 8 Cal.4th 791, 799, 35 Cal.Rptr.2d 418, 883 P.2d 960.) "Further, the lack of adherence to the California dependency scheme may have adverse implications for the child's permanency and stability, which are of paramount importance, and the parent's interest in the child, which is fundamental." ( In re Nickolas T. (2013) 217 Cal.App.4th 1492, 1501, 159 Cal.Rptr.3d 521.) We therefore exercise our discretion to consider the issues raised in the appeal.
Because the question is one of law, we review the claimed error de novo. ( Dakota H., supra, 132 Cal.App.4th at p. 222, 33 Cal.Rptr.3d 337.)
D
THE CONDITIONAL REMOVAL ORDER
1. The Parties' Arguments
E.S. contends the conditional removal order is an order for removal under section 361, subdivision (c). Section 361, subdivision (c) provides a dependent child shall not be taken from the physical custody of his or her parents unless the juvenile court finds clear and convincing evidence there is or would be a substantial danger to the physical health, safety, protection, or physical or emotional well-being of the child in the parent's care, and there are no reasonable means by which the child's physical health can be protected without removing the child from the parent's physical custody. E.S. argues the conditional removal order changes the legal standards for removal.
The Agency argues the conditional removal order is a detention warning. The Agency acknowledges the juvenile court generally should not assess risk prospectively, and the better approach is to allow the social worker to assess the risk of imminent harm and bring the case before the juvenile court for a detention hearing and further proceedings under sections 300 or 387. Nevertheless, the Agency argues because the juvenile court reasonably determined that C.M. would be at immediate risk of harm if exposed to K.K., the conditional removal order is valid under the court's authority to make reasonable orders for the care, supervision and custody of a dependent child (§ 362, subd. (a)), including limiting the parent's exercise of control over the child by a parent (§ 361, subd. (a)).
*900*3872. The Juvenile Court May Only Direct the Agency to Take Such Immediate Action as is Authorized By Law and Fact
The Legislature has vested the juvenile court with the authority to fashion orders concerning the welfare of a dependent child. ( Nickolas F. v. Superior Court (2006) 144 Cal.App.4th 92, 111, 50 Cal.Rptr.3d 208 ( Nickolas F . ).) "The juvenile court has a special responsibility to the child as parens patriae and must look to the totality of a child's circumstances when making decisions regarding the child." ( In re Chantal S. (1996) 13 Cal.4th 196, 201, 51 Cal.Rptr.2d 866, 913 P.2d 1075.) "Within its limited jurisdiction, the authority of the juvenile court is extensive." ( Nickolas F ., supra , at p. 111, 50 Cal.Rptr.3d 208, citing § 245.5 [the juvenile court may direct all such orders to the parents of a dependent child as the court deems necessary and proper for the best interests of the child].)
This broad general grant of authority to the juvenile court to fashion orders concerning the child's welfare is tempered by more specific statutes. ( Nickolas F ., supra , 144 Cal.App.4th at p. 111, 50 Cal.Rptr.3d 208.) For example, although sections 245.5 and 361, subdivision (a) authorize the juvenile court to limit the control to be exercised over a dependent child by a parent, those "limitations may not exceed those necessary to protect the child." (§ 361, subd. (a).) As relevant to the issues raised in this appeal, the Legislature has enacted specific statutes governing the removal of the child from his or her home.
A social worker has the authority to detain a child in protective custody if there is reasonable cause to believe the child is in imminent danger of physical or sexual abuse or the physical environment poses an immediate threat to the child's health or safety. (§§ 305, subd. (a), 306, subd. (a)(2).) Before taking a minor into custody, the Legislature directs the social worker to consider whether the child can remain safely in his or her residence. The consideration of whether the child can remain safely at home shall include, but is not limited to, whether there are any reasonable services available to the worker which, if provided to the minor's parent, would eliminate the need to remove the minor from the custody of his or her parent. (§ 306, subd. (b).)
Section 309 also imposes duties on a social worker. It provides when a child has been temporarily detained, "the social worker shall immediately investigate the circumstances of the child and the facts surrounding the child's being taken into custody and attempt to maintain the child with the child's family through the provision of services. The social worker shall *388immediately release the child to the custody of the child's parent, guardian, or responsible relative, ... unless one or more of the following conditions exist: [¶] ... [¶] (2) Continued detention of the child is a matter of immediate and urgent necessity for the protection of the child and there are no reasonable means by which the child can be protected in his or her home or the home of a responsible relative." (§ 309, subd. (a)(2).)
With respect to a dependent child who remains in the care of a parent, the Legislature directs that an order changing or modifying a previous order by removing a child from the physical custody of a parent shall be made only after noticed hearing upon a supplemental petition. (§ 387, subd. (a).) The supplemental petition shall be filed by the social worker in the original matter and shall contain a concise statement of facts sufficient to support the conclusion that the previous disposition has not been effective in the rehabilitation or protection of the child. (§ 387, subd. (b).) The matter must be set for hearing within *90130 days. (§ 387, subd. (d).) An order for the detention of the child pending adjudication of the petition may be made only after a hearing. (§ 387, subd. (e); see §§ 305, 306, 309, 319.)
"The standard for removal on a supplemental petition is the same as removal on an original petition: the agency must show by 'clear and convincing evidence ... [t]here is a substantial danger to the physical health, safety, protection, or physical or emotional well-being of the minor' if left in parental custody 'and there are no reasonable means by which the minor's physical health can be protected without removing the minor from [parental] physical custody.' " ( Kimberly R. v. Superior Court (2002) 96 Cal.App.4th 1067, 1077, 117 Cal.Rptr.2d 670 ( Kimberly R. ).)
The statutes authorizing temporary detention and removal of the child from the parent's custody and control are "demanding substantive and procedural requirements ... carefully calculated to constrain judicial discretion, diminish the risk of erroneous findings of parental inadequacy and detriment to the child, and otherwise protect the legitimate interests of the parents." (Cf. Cynthia D. v. Superior Court (1993) 5 Cal.4th 242, 256, 19 Cal.Rptr.2d 698, 851 P.2d 1307 [discussing termination of parental rights].) The conditional removal order in this case alters those substantive and procedural requirements.
As the parties' arguments indicate, the wording of the conditional removal order is ambiguous. We need not resolve the ambiguity here. At the outset, we may eliminate the idea that any exposure to K.K. by itself will justify [C.M.'s] removal from the home. "Violations of court orders are not to be encouraged and violators may be appropriately punished. Taking away *389one's children is not an appropriate punishment." ( In re W.O. (1979) 88 Cal.App.3d 906, 910, 152 Cal.Rptr. 130.)
To the extent the order is an order for immediate temporary detention of the child, the conditional removal order encroaches on the Legislature's specific directive to the social worker to assess the risk to the child in the home, and disregards the factual findings necessary for protective detention. To detain a child in protective custody, the focus must be exclusively on the question whether the child is in imminent danger of physical or sexual abuse or the physical environment poses an immediate threat to the child's health or safety. (§§ 305, subd. (a), 306, subd. (a)(2).)
To the extent the order purports to remove the care, custody, and control of a dependent child from the child's parent and place it with the court, the proper inquiry is whether there is clear and convincing evidence of a substantial danger to the child's physical health, safety, protection, or physical or emotional well-being in parental custody and there are no reasonable means by which the minor's physical health can be protected without removing the child from his home. ( In re Paul E ., supra , 39 Cal.App.4th at pp. 1003-1004, 46 Cal.Rptr.2d 289.) The conditional removal order thus contravenes specific statutory requirements for notice and the opportunity to be heard (§§ 387, 290.1), the burden and standard of proof (§ 361, subd. (c)(1)), and the factual findings required to remove a dependent child from the custody of his or her parent. (Ibid .; § 387; Kimberly R., supra, 96 Cal.App.4th at p. 1077, 117 Cal.Rptr.2d 670.)
While we appreciate the juvenile court's assessment of the need to warn E.S. in no uncertain terms there may be serious consequences if C.M. has any contact with K.K., we must conclude that the court erred when it issued a conditional removal order. Removal, including a temporary detention, must be made on a timely assessment of risk to the child. (§§ 305, subd.
*902(a), 306, subd. (a)(2), 361, subd. (c)(1).) Here, the court may have informed E.S. about the potential legal consequences of exposing C.M. to K.K., including removal from her custody and termination of parental rights. The court may have directed the Agency to immediately bring to its attention any evidence of contact between C.M. and K.K., and to set a hearing to address the issue. However, the conditional removal order disregards the dependency scheme, which is carefully calculated, not only to protect the child, but also to guarantee procedural and substantive due process to the child and the parent.5
*390DISPOSITION
The conditional removal order is reversed.
WE CONCUR:
McCONNELL, P. J.
DATO, J.
Further unspecified statutory references are to the Welfare and Institutions Code.
After the jurisdictional and dispositional hearings, the Agency located C.M., Sr., in another state.
Under section 213.5, the juvenile court has exclusive jurisdiction to issue an ex parte restraining order to protect the child from any person. (§ 213.5, subd. (a).) Upon notice and a hearing, the juvenile court generally can extend a restraining order for no more than three years. (§ 213.5, subd. (d)(1).) A hearing under section 213.5 may be held simultaneously with any regularly scheduled hearings to declare the child a dependent child, or subsequent hearings regarding the dependent child. (§ 213.5, subd. (c)(5).) An order after hearing must be prepared on Restraining Order -Juvenile (form JV-255). (Cal. Rules of Court,3 rules 5.620(b), 5.630(f)(2).)
For convenience, we refer to the court's order as the "conditional removal order."
Because we reverse the order on these grounds, we need not address the other issues appellant raises on appeal.