.tree-lab{margin:22px 0 20px;max-width:100%;color:var(--green-dark)}
.tree-lab button,.tree-lab input{font:inherit}.tree-lab button{cursor:pointer;color:var(--green-dark)}
.tree-lab button:focus-visible,.tree-lab canvas:focus-visible,.tree-lab input:focus-visible{outline:3px solid #d8793e;outline-offset:3px}
.tree-lab .figure{margin:0;border:1px solid rgba(24,61,45,.18);border-radius:12px;background:rgba(244,238,220,.6);overflow:hidden}
.tree-lab .figure-top{display:flex;justify-content:space-between;gap:10px;padding:16px 18px 0;font-size:.62rem;font-weight:600;letter-spacing:.1em;color:var(--muted)}
.tree-lab canvas{display:block;width:100%;height:350px;touch-action:pan-y;cursor:grab}.tree-lab canvas.dragging{cursor:grabbing}
.tree-lab .scene-note{text-align:center;padding:0 18px;margin-bottom:10px;font-family:Fraunces,Georgia,serif;font-size:1rem;line-height:1.35;color:#183d2d}
.tree-lab .figure-tools{display:flex;justify-content:space-between;align-items:center;gap:8px;margin:0 18px;padding:11px 0 12px;border-top:1px solid var(--line);font-size:.7rem;color:var(--muted)}
.tree-lab .figure-tools>div{display:flex;gap:6px}.tree-lab .figure-tools button{background:transparent;border:1px solid rgba(24,61,45,.22);border-radius:999px;padding:5px 11px;font-size:.66rem}
.tree-lab .figure-tools button[aria-pressed=true]{background:rgba(145,169,106,.18);border-color:#91a96a}
.tree-lab .angle-control{display:none}.tree-lab .switcher-label{margin:18px 0 8px;text-align:center;font-size:.75rem;color:var(--muted)}
.tree-lab .topics{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;padding:0;margin:0}
.tree-lab .topics button{min-width:0;border:1px solid rgba(24,61,45,.22);border-radius:999px;background:#fff9e8;padding:10px 9px;font-weight:600;font-size:.8rem;line-height:1.2;transition:background .18s}
.tree-lab .topics button span{display:none}.tree-lab .topics button:hover{background:rgba(145,169,106,.2)}
.tree-lab .topics button[aria-pressed=true]{background:#183d2d;border-color:#183d2d;color:#f4eedc}
.tree-lab .tree-stage{display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr);border:1px solid rgba(24,61,45,.18);border-radius:12px;background:rgba(244,238,220,.6);overflow:hidden}
.tree-lab .tree-stage .figure{min-width:0;border:0;border-radius:0;background:transparent}
.tree-lab .care-selector{min-width:0;align-self:center;padding:20px 18px 20px 6px}
.tree-lab .care-selector .switcher-label{margin:0 0 13px;font-size:.7rem;line-height:1.45}
.tree-lab .care-selector .topics{grid-template-columns:minmax(0,1fr);gap:9px}
.tree-lab .care-selector .topics button{min-height:42px}
@media(max-width:639px){.tree-lab .tree-stage{display:block;border:0;border-radius:0;background:transparent;overflow:visible}.tree-lab .tree-stage .figure{border:1px solid rgba(24,61,45,.18);border-radius:12px;background:rgba(244,238,220,.6)}.tree-lab .care-selector{padding:12px 0 0}.tree-lab .care-selector .switcher-label{margin:18px 0 8px}.tree-lab .care-selector .topics{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px}}
.tree-lab .advice{padding:20px 2px 0;margin:0;min-height:0}.tree-lab .advice-number{display:none}
.tree-lab .advice h3{margin:0 0 10px;font-size:1.4rem;line-height:1.15;color:#183d2d}
.tree-lab .advice p{margin:0;font-size:.96rem;line-height:1.6}.tree-lab .takeaway{margin:13px 0 0;padding-left:13px;border-left:3px solid #91a96a;font-size:.86rem;line-height:1.55;color:#2b3a2c}
.tree-lab .advice-details{margin:12px 0 0;padding-left:20px;font-size:.9rem;line-height:1.5}.tree-lab .advice-details li{margin:6px 0}.tree-lab .advice-details[hidden]{display:none}
.tree-lab .inside{width:100%;border:0;border-top:1px solid var(--line);margin:21px 0 0;padding:13px 0 0;background:transparent;text-align:left;font-weight:600;font-size:.85rem;color:#1f5f3b}
.tree-lab .inside>span:first-child{font-weight:400;color:var(--muted);margin-right:7px}.tree-lab .inside>span:last-child{float:right}.tree-lab .inside[aria-pressed=true]{color:#a94f32}
.tree-lab+.tree-care__principle{margin-top:24px}.tree-lab .tree-details{margin:18px 0 0;border-top:1px solid var(--line);padding-top:12px;font-size:.85rem;color:var(--muted)}
.tree-lab .tree-details summary{cursor:pointer}.tree-lab .tree-details h3{font-size:1rem;margin:18px 0 8px}.tree-lab .tree-details p,.tree-lab .tree-details li{font-size:.86rem;line-height:1.6}


@media(max-width:560px){.tree-lab canvas{height:310px}.tree-lab .figure-top{padding:12px 12px 0;font-size:.52rem}.tree-lab .scene-note{font-size:.89rem;padding:0 12px}.tree-lab .figure-tools{margin:0 12px;font-size:.6rem}.tree-lab .figure-tools button{font-size:.61rem;padding:5px 8px}.tree-lab .topics button{font-size:.71rem;padding:10px 5px;min-height:38px}.tree-lab .advice{padding-top:19px}.tree-lab .advice h3{font-size:1.28rem}.tree-lab .advice p{font-size:.91rem}.tree-lab .takeaway{font-size:.8rem}.tree-lab .inside{font-size:.78rem}.tree-lab .inside>span:first-child{display:block;margin-bottom:5px}}
@media(prefers-reduced-motion:reduce){.tree-lab *{transition:none!important}}

/* Alternate local study: care selectors above the tree/description panel. */
.tree-lab--text-side>.topics{grid-template-columns:repeat(6,minmax(0,1fr));gap:6px;margin-bottom:14px}
.tree-lab--text-side>.topics button{padding:9px 5px;font-size:.7rem;min-height:44px}
.tree-lab--text-side .tree-stage{grid-template-columns:minmax(0,1.15fr) minmax(0,1fr)}
.tree-lab--text-side .tree-stage .figure{position:relative;align-self:stretch;min-height:380px}
.tree-lab--text-side .figure canvas{position:absolute;inset:0;width:100%;height:100%}
.tree-lab--text-side .tree-stage .advice{align-self:center;padding:22px 22px 22px 8px;min-width:0}
.tree-lab--text-side .advice h3{font-size:1.3rem}
.tree-lab--text-side .advice p{font-size:.9rem;line-height:1.55}
.tree-lab--text-side .takeaway{font-size:.8rem}
@media(max-width:760px){
  .tree-lab--text-side>.topics{grid-template-columns:repeat(3,minmax(0,1fr));gap:7px;margin-bottom:12px}
  .tree-lab--text-side .tree-stage{display:block;border:0;border-radius:0;background:transparent;overflow:visible}
  .tree-lab--text-side .tree-stage .figure{min-height:0;border:1px solid rgba(24,61,45,.18);border-radius:12px;background:rgba(244,238,220,.6)}
  .tree-lab--text-side .figure canvas{position:static;height:310px}
  .tree-lab--text-side .tree-stage .advice{padding:20px 2px 0}
}

/* Progressive enhancement: show all advice if scripting is unavailable. */
