/* A completed flock remains visible; success lives inside the empty pen. */
/* Only the garden controls move; the chicken puzzle keeps its existing layout. */
#controls.controls{bottom:max(8px,env(safe-area-inset-bottom))}
@media(max-height:520px) and (orientation:landscape){#controls.controls{bottom:max(8px,env(safe-area-inset-bottom))}}
.pen-result{inset:0;z-index:4;padding:0;background:none;backdrop-filter:none;pointer-events:none;display:grid;place-items:center}
.pen-result .completion-card{width:auto;height:auto;display:flex;align-items:center;justify-content:center;gap:6px;pointer-events:auto;background:#fff3d7ed;border:1px solid #cba66b;border-radius:16px;padding:10px 18px;box-shadow:0 3px 12px #17372433}
#resultIzzy{height:154px;width:128px;max-width:38%;object-fit:contain;flex:none;pointer-events:none}
.result-actions{display:flex;align-items:center;justify-content:center;gap:6px;flex-wrap:wrap;max-width:190px}
.result-actions .result-stars{flex-basis:100%;font-size:16px;margin:0;line-height:1.05;text-shadow:0 1px #fff3d1}
#miniResult.pen-result .picture-button{width:48px;height:48px;min-width:48px;min-height:48px;padding:0;margin:0;display:block}
#miniResult.pen-result .picture-button img{width:100%;height:100%;max-width:none;max-height:none}
#new-coop{margin:10px auto 0;display:block;min-height:44px}
@media(max-height:440px){#miniResult.pen-result .picture-button{width:44px;height:44px;min-width:44px;min-height:44px}.result-actions{gap:3px}.result-actions .result-stars{font-size:12px}}

/* The Run toggle stays visibly selected until the player turns it off. */
#controls #runButton{position:relative;transition:transform .12s,box-shadow .12s}
#controls #runButton[aria-pressed="true"]{transform:translateY(3px);box-shadow:0 0 0 2px #fff0c0,0 0 0 5px #426b41,inset 0 3px 5px #163d3266}
#controls #runButton[aria-pressed="true"] img{filter:none;transform:none}
#controls #runButton[aria-pressed="true"]::after{content:'✓';position:absolute;right:-3px;top:-4px;width:17px;height:17px;border:1px solid #fff0c0;border-radius:50%;background:#315d3b;color:#fff5d5;font:bold 13px/16px Arial;text-align:center;pointer-events:none}

/* The art is the target. Captions are short, unboxed, and never catch a tap. */
.discovery-targets{position:absolute;inset:0;z-index:2;pointer-events:none}
.discovery-targets .discovery-target{position:absolute;pointer-events:auto;cursor:pointer;touch-action:manipulation;margin:0;padding:0;background:none;border:0;box-shadow:none;border-radius:10px;color:transparent;user-select:none;-webkit-user-select:none}
.discovery-targets .discovery-target:hover,.discovery-targets .discovery-target:active{background:none;transform:none;box-shadow:none}
.discovery-targets .discovery-target:focus-visible{outline:2px dashed #fff2bc;outline-offset:2px}
#discoverButton.discovery-hint{position:absolute;z-index:3;pointer-events:none;user-select:none;-webkit-user-select:none;cursor:default;bottom:auto;width:194px;max-width:calc(100% - 24px);height:30px;display:grid;place-items:center;text-align:center;white-space:normal;border:0;padding:0;background:none;box-shadow:none;transform:none;filter:none}
.discover-caption{font:700 14px/1.2 Trebuchet MS,Arial,sans-serif;color:#fff7dd;-webkit-text-stroke:3px #233a24;paint-order:stroke fill;text-shadow:0 2px 4px #132514;letter-spacing:.1px}
@media(min-width:1100px){.discover-caption{font-size:15px}}

/* The final win is one clear moment, then the garden and its reward. */
#miniResult.journey-complete{inset:0;left:0;top:0;width:auto;height:auto;display:grid;place-items:center;padding:18px;background:#163c2999;backdrop-filter:blur(3px);z-index:6;pointer-events:auto}
#miniResult.journey-complete .completion-card{width:min(430px,100%);height:auto;max-height:calc(100% - 24px);display:flex;flex-direction:column;gap:0;padding:20px 24px 24px;border:2px solid #cba66b;border-radius:16px;background:#fff3d7;box-shadow:0 8px 28px #17372466;text-align:center}
.journey-complete #resultIzzy{width:112px;height:135px;max-width:none}
.journey-complete .result-actions{display:flex;flex-direction:column;gap:7px;max-width:100%;width:100%}
.journey-complete .result-stars{font-size:24px;color:#436637;letter-spacing:2px;flex-basis:auto}
.journey-complete #resultTitle,.journey-complete #resultText{position:static;left:auto;width:auto;height:auto;overflow:visible;margin:0}
.journey-complete #resultTitle{font:34px/1.15 Georgia,serif;color:#294b33}
.journey-complete #resultText{font:17px/1.35 Trebuchet MS,Arial;color:#345437}
.journey-complete #resultReturnNotice{font:13px/1.4 Trebuchet MS,Arial;color:#6b684d;margin:5px 0 0}
#coopSaveStatus{font:12px/1.4 Trebuchet MS,Arial;color:#4c6440;margin:9px 0 0;text-align:center}
#optionsPanel .options-grid{grid-template-columns:repeat(3,1fr);align-items:start;margin-top:10px}
#optionsPanel #closeOptions{height:78px;min-height:78px;margin:0}
.speech.clue-nearby{pointer-events:none}
@media(max-height:440px){#miniResult.journey-complete .completion-card{flex-direction:row;gap:14px;padding:14px 22px;width:min(440px,100%)}.journey-complete #resultIzzy{width:95px;height:115px}.journey-complete #resultTitle{font-size:29px}.journey-complete #resultText{font-size:15px}}
