.restore-shell{min-height:100svh;background:#123c30;color:#fff6db}.restore-content{max-width:1040px;margin:auto;padding:22px 30px 40px}.restore-instructions{font-size:18px;line-height:1.55;margin:0 0 20px;max-width:900px}.restore-status{display:flex;align-items:center;justify-content:space-between;gap:15px;flex-wrap:wrap;margin:14px 0 20px}.restore-status strong{font-size:20px;color:#ffdc83}.restore-feedback{min-height:26px;font-size:17px;color:#e7f8be;line-height:1.5;margin:18px 0}.restore-feedback.wrong{color:#ffd29e}.restore-note{background:#ffffff0d;border:1px solid #aac69655;border-radius:12px;padding:14px 18px;font-size:16px;line-height:1.55;margin:18px 0}.memory-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:14px}.memory-card{aspect-ratio:1/1.1;min-height:125px;position:relative;border:3px solid #d7b161;border-radius:18px;background:linear-gradient(135deg,#285e4b,#153e33);color:#ffe9a6;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;box-shadow:0 5px 0 #08241d;font-size:17px;font-weight:700;transition:background .2s,transform .2s}.memory-card>b{font-size:50px;font-family:Georgia,serif}.memory-card.face-up{background:#fffbe9;color:#244c37}.memory-card:disabled{opacity:1;cursor:default}.memory-card.matched{background:#d8ebc3;border-color:#8fc177}.memory-card .sprite{width:76px;height:76px;mix-blend-mode:multiply}.memory-card i{position:absolute;right:8px;top:5px;color:#2c733c}.restore-symbol{display:inline-block;font-size:58px;line-height:1.1}.kit-list{display:flex;justify-content:center;flex-wrap:wrap;gap:10px;margin:22px 0}.kit-list span{padding:9px 14px;border:1px solid #aec58b77;border-radius:30px;color:#c2d7bf;font-size:15px}.kit-list .collected{background:#d8ebc3;color:#245235;font-weight:700}.plant-scene{height:330px;position:relative;background-size:cover;background-position:center;border:2px solid #99b274;border-radius:18px;overflow:hidden}.plant-caption{position:absolute;top:14px;left:18px;background:#133d30ed;color:#fff5d4;padding:8px 12px;border-radius:8px;font-size:15px;font-weight:700}.plant-progress-art{position:absolute;left:50%;bottom:40px;transform:translateX(-50%);background:#fffbeac9;border-radius:50%;padding:12px}.plant-progress-art .sprite{width:100px;height:100px;mix-blend-mode:multiply;transform-origin:bottom center}.stage-3 .plant-progress-art .sprite{width:120px;height:120px}.stage-4 .plant-progress-art .sprite{width:155px;height:155px;animation:tree-grows 1.8s ease-out}.stage-5 .plant-progress-art .sprite{width:190px;height:190px;animation:tree-grows 2s ease-out}.plant-sun{position:absolute;top:20px;right:30px;background:#fff8cd;border-radius:50%}.plant-sun .sprite{width:72px;height:72px;mix-blend-mode:multiply}.plant-water{position:absolute;bottom:90px;left:34%;font-size:50px;animation:water-tree 1s ease-in-out 2}.plant-stage-label{position:absolute;bottom:0;left:0;right:0;padding:10px;background:#0e342aea;text-align:center;font-size:17px}.plant-sequence{display:flex;flex-wrap:wrap;gap:8px;margin:18px 0}.plant-sequence span{padding:9px 12px;background:#ffffff15;border-radius:8px;font-size:15px}.plant-sequence .done{background:#d8ebc3;color:#1c5332}.plant-tools{display:grid;grid-template-columns:repeat(5,1fr);gap:12px}.plant-tool{display:flex;flex-direction:column;align-items:center;gap:10px;padding:14px 8px;background:#fffbe7;border:2px solid #cbb075;border-radius:14px;color:#234d36;font-size:16px;font-weight:700}.plant-tool .sprite{width:68px;height:68px;mix-blend-mode:multiply}.plant-tool .restore-symbol{font-size:56px}.plant-tool:disabled{opacity:.4}.trap-board{display:grid;grid-template-columns:repeat(6,1fr);gap:7px;max-width:540px;margin:0 auto;background:#071f18;padding:14px;border-radius:18px;border:2px solid #93ac71}.trap-cell{aspect-ratio:1;border:2px solid #849b62;border-bottom:5px solid #335c39;border-radius:9px;background:linear-gradient(135deg,#688e48,#476e35);color:#fff4c3;font-size:30px;font-weight:800;touch-action:manipulation;min-width:0}.trap-cell.revealed{background:#ede8cc;border:1px solid #b8c198;color:#537649}.trap-cell.revealed.n-1{color:#2866ad}.trap-cell.revealed.n-2{color:#28713b}.trap-cell.revealed.n-3{color:#a54428}.trap-cell.revealed.n-4{color:#653a8a}.trap-cell.trap-hit{background:#ffc79f;border-color:#a44626;color:#85381e}.trap-cell:disabled{opacity:1}.restore-bear{text-align:center}.restore-bear .sprite{width:130px;height:130px;mix-blend-mode:multiply}.pipe-tray{display:flex;justify-content:center;gap:15px;margin:18px 0}.pipe-piece{display:flex;align-items:center;gap:12px;max-width:290px;padding:10px 18px;background:#e9f0da;border:3px solid #93ad7d;border-radius:14px;color:#234d36;font-size:17px}.pipe-piece.selected{border-color:#efbd4c;background:#fff2c4}.pipe-piece svg{width:55px;height:55px;background:#284d49;border-radius:8px;flex-shrink:0}.pipe-piece b{display:block;font-size:15px;margin-top:6px}.pipe-map{position:relative;padding-left:150px;max-width:660px;margin:20px auto}.pipe-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:0;border:5px solid #a6bda1;border-radius:8px;overflow:hidden;background:#173b3c}.pipe-cell{padding:0;aspect-ratio:1;border:1px solid #91b9a960;background:#244c4d;position:relative;min-width:0;touch-action:manipulation}.pipe-cell.selected{background:#527268;box-shadow:inset 0 0 0 4px #ffe394}.pipe-cell svg{display:block;width:100%;height:100%;overflow:hidden}.pipe-rim{stroke:#ccd7c4;stroke-width:31;fill:none;stroke-linecap:butt}.pipe-inside{stroke:#667e79;stroke-width:20;fill:none}.pipe-water{stroke:#62d9f0;stroke-width:12;fill:none;opacity:0}.flowing .pipe-water{animation:pipe-fill .3s ease-out both;animation-delay:var(--flow-delay)}.pipe-empty{font-size:38px;color:#81a699}.pipe-cell:disabled{opacity:1}.pipe-endpoint{position:absolute;left:0;width:146px;padding:12px 5px;border-radius:10px;font-size:16px;font-weight:800;line-height:1.4;text-align:center}.pipe-endpoint.inlet{top:5%;background:#f4c272;color:#694017}.pipe-endpoint.outlet{bottom:5%;background:#b6ddbb;color:#204d35}.restore-content>.actions{justify-content:center}.restore-status .actions{margin:0}.restore-status .actions button{font-size:15px;padding:10px 14px}@keyframes tree-grows{from{transform:scale(.75)}to{transform:scale(1)}}@keyframes water-tree{from{transform:translateY(-12px);opacity:.6}to{transform:translateY(5px);opacity:1}}@keyframes pipe-fill{from{opacity:0}to{opacity:1}}
@media(max-width:650px){.restore-content{padding:18px 14px 30px}.restore-instructions{font-size:16px}.memory-grid{grid-template-columns:repeat(2,1fr);gap:9px}.memory-card{aspect-ratio:auto;min-height:104px;flex-direction:row;gap:10px;font-size:15px;border-radius:12px}.memory-card .sprite{width:55px;height:55px}.memory-card .restore-symbol{font-size:44px}.memory-card>b{font-size:36px}.memory-card span:not(.sprite){max-width:85px}.restore-status{gap:10px}.restore-status strong{font-size:18px}.kit-list{gap:6px}.kit-list span{font-size:14px;padding:6px 10px}.plant-tools{gap:6px}.plant-tool{padding:10px 2px;font-size:14px}.plant-tool .sprite{width:42px;height:42px}.plant-tool .restore-symbol{font-size:36px}.plant-scene{height:290px}.plant-caption{font-size:13px;left:9px}.plant-stage-label{font-size:15px}.plant-sequence span{font-size:14px;padding:7px 9px}.trap-board{gap:5px;padding:9px}.trap-cell{font-size:25px;border-radius:6px}.pipe-map{padding-left:94px}.pipe-endpoint{width:90px;font-size:12px;padding:9px 3px}.pipe-piece{padding:8px;gap:8px;font-size:14px}.pipe-piece svg{width:40px;height:40px}.pipe-piece b{font-size:14px}.pipe-tray{gap:9px}.restore-note{font-size:14px;padding:12px}.restore-feedback{font-size:15px}.restore-content .actions{gap:8px}.restore-content .actions button{padding:10px 12px;font-size:14px}}@media(prefers-reduced-motion:reduce){.flowing .pipe-water{opacity:1}}

/* Restore the habitats around the game boards, while keeping the controls readable. */
.restore-shell{background-position:center;background-size:cover;background-attachment:fixed}
.restore-logging{background-image:linear-gradient(#142d2140,#142d2140),url('forest-map.png')}
.restore-hunting{background-image:linear-gradient(#172a2245,#172a2245),url('world.png')}
.restore-runoff{background-image:linear-gradient(#302b1740,#302b1740),url('farm-map.png')}
.restore-content{margin:24px auto;width:calc(100% - 44px);background:#102c23b8;border:1px solid #ecddb67a;border-radius:22px;box-shadow:0 12px 40px #10251c55}
.restore-shell .field-header{background:#163d32ed}
.trap-cell .trap-art{display:block;width:100%;height:100%;object-fit:contain;pointer-events:none}
.trap-cell.trap-hit{padding:2px;background:#f4dfb8}
.sapling-art{display:inline-block;position:relative;width:76px;height:76px;flex-shrink:0;vertical-align:middle}
.sapling-current,.sapling-previous{position:absolute;inset:0;background-image:url('sapling-growth.png');background-size:300% 100%;background-repeat:no-repeat;background-position:var(--sapling-frame) 0}
.sapling-previous{background-position:var(--previous-frame) 0;animation:sapling-fade 2.3s ease-in-out forwards}
.sapling-art.growing .sapling-current{animation:sapling-reveal 2.3s ease-in-out both;transform-origin:50% 88%}
.plant-progress-art{background:transparent;border-radius:0;padding:0;bottom:36px}
.plant-progress-art .sapling-art{width:260px;height:260px}
.plant-tools .sapling-art{width:68px;height:68px}
@keyframes sapling-fade{0%,15%{opacity:1}100%{opacity:0}}
@keyframes sapling-reveal{0%{opacity:0;transform:scale(.92)}100%{opacity:1;transform:scale(1)}}
@media(max-width:650px){.restore-content{width:calc(100% - 20px);margin:12px auto;border-radius:15px;padding:16px 12px 26px}.memory-card .sapling-art{width:55px;height:55px}.plant-tools .sapling-art{width:42px;height:42px}.plant-progress-art .sapling-art{width:230px;height:230px}}
@media(prefers-reduced-motion:reduce){.sapling-previous{display:none}.sapling-art.growing .sapling-current{opacity:1}}

.restore-instructions,.restore-status strong,.restore-feedback{text-shadow:0 1px 3px #071a14}

/* Six-by-six drainage puzzle: protected habitat stays visible between routes. */
.pipe-map{max-width:570px;padding:0;margin:20px auto}.pipe-grid{grid-template-columns:repeat(6,minmax(0,1fr));border-width:4px}.pipe-endpoint{position:static;width:auto;text-align:left;padding:10px 14px;font-size:16px}.pipe-endpoint small{display:block;font-size:14px;font-weight:500}.pipe-endpoint.inlet{margin-bottom:8px}.pipe-endpoint.outlet{margin-top:8px}.pipe-cell.blocked{background:#9a794c;cursor:not-allowed;box-shadow:inset 0 0 12px #34241277}.pipe-obstacle-art{display:block;aspect-ratio:1;background-image:url('pipe-obstacles.png');background-size:200% 100%;background-repeat:no-repeat;width:100%;height:100%;pointer-events:none}.pipe-obstacle-art.roots{background-position:0 0}.pipe-obstacle-art.burrow{background-position:100% 0}.pipe-legend{display:flex;justify-content:center;flex-wrap:wrap;gap:10px 24px;font-size:15px}.pipe-legend>span{display:flex;align-items:center;gap:8px}.pipe-legend i{width:42px;height:42px;flex-shrink:0}.pipe-start{box-shadow:inset 0 0 0 3px #f4c272}.pipe-finish{box-shadow:inset 0 0 0 3px #b6ddbb}.pipe-port-label{position:absolute;left:2px;top:1px;font-size:12px;line-height:1.2;font-weight:800;background:#173b3c;color:white;padding:1px 2px;pointer-events:none}@media(max-width:650px){.pipe-empty{font-size:27px}.pipe-map{padding:0}.pipe-endpoint{width:auto;font-size:15px}.pipe-tray{gap:8px}.pipe-piece{flex:1;min-width:0}.pipe-piece svg{width:34px;height:34px}.pipe-legend{font-size:14px;gap:6px}.pipe-legend i{width:34px;height:34px}.pipe-port-label{font-size:12px}}
