.forest-panel{background:var(--color-surface);color:var(--color-text);padding:clamp(18px,3vw,30px);border:1px solid var(--color-border);border-radius:8px 24px 24px 8px;margin:22px 0;box-shadow:0 4px 0 var(--color-surface-alt)}.forest-panel h2{font-size:1.5rem;margin:0 0 12px}.forest-panel p{line-height:1.6}.forest-panel button{font:inherit;min-height:44px;padding:12px 18px;border:2px solid #256147;border-radius:14px;background:#e2f2d2;color:#20382d;cursor:pointer;font-weight:700;margin:6px 5px 6px 0}.forest-panel button:hover{background:#cce8b5}.forest-panel button:focus-visible{outline:3px solid #803acd;outline-offset:3px}.forest-panel button:disabled{cursor:default;background:#eeeee6;color:#555b51;border-color:#9ca69a}.forest-companion{display:flex;align-items:center;gap:12px;background:#f9dc90;color:#293c29;border-radius:18px;padding:8px 18px;margin-bottom:12px}.forest-companion img{width:52px;height:52px}.forest-companion p{margin:0;font-weight:650}.buddy-choices{display:flex;gap:12px;flex-wrap:wrap}.buddy-choice{display:flex;align-items:center;gap:10px}.buddy-choice img{width:50px;height:50px}.buddy-choice[aria-pressed=true]{background:#d7c4ed;border-color:#603487}.forest-map{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));list-style:none;gap:14px;padding:0}.forest-map li{min-width:0}.forest-panel .forest-station{display:flex;flex-direction:column;align-items:center;justify-content:flex-start;gap:10px;width:100%;height:100%;margin:0;text-align:center;background:#e1effa}.station-number{border-radius:50%;background:#25583d;color:white;width:38px;height:38px;display:grid;place-items:center;font-size:1.3rem}.forest-station small{font-weight:400}.review-panel{background:var(--color-surface-alt)}.review-words{display:flex;gap:8px;flex-wrap:wrap;list-style:none;padding:0}.review-words li{background:var(--color-surface);color:var(--color-text);border:1px solid var(--color-border);border-radius:20px;padding:8px 14px}.forest-panel form{display:flex;align-items:flex-start;flex-direction:column;gap:8px;padding:12px 0}.forest-panel input{font:inherit;max-width:100%;width:100%;box-sizing:border-box;min-height:44px;border:2px solid #638071;border-radius:10px;padding:10px;background:white;color:#20382d}.forest-panel details{margin:16px 0}.forest-panel summary{cursor:pointer;padding:12px;border:1px solid #638071;border-radius:12px}.class-room{border-top:2px dashed #83a074;margin-top:24px;padding-top:12px;overflow-wrap:anywhere}.class-room progress{width:100%;height:24px;accent-color:#256147}.class-question{background:#f5ecd5;color:#20382d;border-radius:18px;padding:16px;margin-top:12px}.class-question img{display:block;width:110px;height:110px;margin:16px auto}.class-question button{display:inline-block}#class-invite{overflow-wrap:anywhere;font-weight:700}@media(max-width:700px){.forest-map{grid-template-columns:repeat(2,minmax(0,1fr))}.buddy-choices{gap:4px}.buddy-choice{flex:1 1 100%;justify-content:flex-start}.forest-companion{font-size:.9rem}}@media(max-width:350px){.forest-map{grid-template-columns:1fr}}

/* Saved badges are read-only facts, with a distinct name and status line. */
#section-progress .achievement-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 12rem), 1fr)); gap: 12px; list-style: none; padding: 0; }
#section-progress .achievement-list li { display: grid; align-content: start; gap: 8px; min-width: 0; padding: 16px; border: 1px solid #9cae92; border-radius: 14px; background: #fffdf5; color: #20382d; }

/* The chooser is available above the fold and without leaving an exercise. */
.forest-companion { flex-wrap: wrap; }
.forest-companion p { flex: 1 1 170px; }
.buddy-change { min-height: 44px; border: 2px solid #40562d; border-radius: 14px; padding: 10px 16px; background: #fffbed; color: #29391f; font: inherit; font-weight: 750; cursor: pointer; }
.buddy-change:hover { background: #e4ebc1; }
.buddy-change:focus-visible, .buddy-choice:focus-visible { outline: 3px solid #803acd; outline-offset: 3px; }
.hero-copy > .buddy-change { display: block; margin-top: 14px; }
.buddy-dialog { margin: auto; width: min(620px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: clamp(18px, 4vw, 30px); border: 2px solid #778950; border-radius: 24px; background: #f5f7e8; color: #29391f; box-shadow: 0 20px 80px #14241155; }
.buddy-dialog::backdrop { background: #1d291d99; }
.buddy-dialog h2 { margin: 0 0 12px; }
.buddy-dialog p { line-height: 1.5; margin: 12px 0; }
.buddy-dialog .buddy-choices { flex-direction: column; }
.buddy-dialog .buddy-choice, .forest-panel .buddy-choice { display: grid; grid-template-columns: 50px 1fr; gap: 2px 12px; text-align: left; padding: 12px 18px; border: 2px solid #77925b; border-radius: 16px; background: #fffdf5; color: #29391f; font: inherit; cursor: pointer; }
.buddy-choice img { grid-row: 1 / 3; }
.buddy-name { font-weight: 800; }
.buddy-dialog .buddy-choice { grid-template-columns: 50px minmax(0, 1fr); min-width: 0; }
.buddy-dialog button { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
.buddy-dialog .buddy-name, .buddy-dialog .buddy-state { min-width: 0; }
.buddy-state { font-size: .82rem; }
.buddy-dialog .buddy-choice[aria-pressed=true], .forest-panel .buddy-choice[aria-pressed=true] { background: #dbe8b6; border-color: #40562d; box-shadow: inset 0 0 0 1px #40562d; }
@media (max-width: 450px) { .forest-companion .buddy-change { width: 100%; } }
/* Memory cards remain readable in both system themes; no speed or motion requirement. */
.memory-shell{max-width:900px;margin:0 auto;padding:clamp(14px,3vw,30px);background:#f5f7e8;color:#29391f;border:2px solid #91a368;border-radius:26px}
.memory-shell h1{font-size:clamp(1.7rem,5vw,2.5rem);margin:24px 0 12px}.memory-shell p{line-height:1.6}.memory-controls{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin:24px 0}.memory-controls select{font:inherit;padding:12px;border:2px solid #657849;border-radius:12px;background:#fffdf5;color:#29391f;max-width:100%}
.memory-board{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin:22px 0}.memory-card{position:relative;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;aspect-ratio:1;min-width:0;border:3px solid #4d6540;border-radius:18px;background:repeating-linear-gradient(45deg,#d8e5b3,#d8e5b3 10px,#e7eecf 10px,#e7eecf 20px);color:#29391f;cursor:pointer;font:inherit;padding:8px;box-shadow:0 4px 0 #acbd86}.memory-card>span{font-size:2rem}.memory-card small{font-size:.72rem}.memory-card strong{font-size:clamp(.8rem,2.7vw,1.6rem);overflow-wrap:anywhere}.memory-card img{width:72%;height:72%;object-fit:contain}.memory-card.is-open{background:#fffdf5}.memory-card.is-matched{background:#e1efd0;border-color:#42713c;box-shadow:none}.memory-card:focus-visible,.memory-shell button:focus-visible,.memory-shell select:focus-visible{outline:3px solid #803acd;outline-offset:3px}.memory-result:not(:empty){padding:18px;background:#f9dc90;border:2px solid #9a731d;border-radius:18px;font-weight:700}.memory-shell [hidden]{display:none!important}
@media(max-width:480px){.memory-board{gap:8px}.memory-card{border-radius:12px;padding:4px}.memory-card small{font-size:.6rem}.memory-card>span{font-size:1.3rem}.memory-card img{width:80%;height:65%}.memory-controls{align-items:stretch;flex-direction:column}.memory-shell{padding:12px}}
