#chicken-run{max-width:1050px;margin:auto}#chicken-run button,#chicken-run select{font:inherit;min-height:44px;border:1px solid var(--line);border-radius:12px;background:var(--surface);color:var(--ink);padding:8px 12px;cursor:pointer}#chicken-run button:focus-visible,#cr-canvas:focus-visible{outline:3px solid var(--gold);outline-offset:2px}#cr-menu{padding:20px}#cr-menu h2{margin-top:0}#cr-start{background:var(--gold)!important;color:var(--page)!important}#cr-stage{position:relative;border-radius:18px;overflow:hidden;background:#c8d8c5;margin:10px 0}#cr-canvas{display:block;width:100%;height:min(57vh,600px);min-height:260px;touch-action:none}#cr-bubble{position:absolute;top:14px;left:50%;transform:translateX(-50%);width:max-content;max-width:80%;text-align:center;border-radius:18px;background:#fff5df;color:#423b2c;padding:10px 18px;pointer-events:none;font-weight:600}#chicken-run #cr-paused{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;width:100%;height:100%;min-height:0;border:0;border-radius:0;background:#293c33e8;color:#fff;text-align:center;padding:24px;cursor:pointer}#chicken-run #cr-paused[hidden]{display:none}#cr-paused strong{font-size:clamp(26px,4vw,36px);font-weight:600;line-height:1.2}#cr-paused span{font-size:18px;font-weight:400}#chicken-run #cr-paused:focus-visible{outline:3px solid var(--gold);outline-offset:-6px}#cr-paused .cr-sleeping-hen{width:clamp(140px,22vh,200px);height:auto;object-fit:contain;margin-bottom:6px;pointer-events:none}@media(max-height:500px){#cr-paused .cr-sleeping-hen{width:85px}#chicken-run #cr-paused{gap:6px}}.cr-toolbar{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.cr-toolbar label{display:flex;align-items:center;gap:5px}.cr-controls{display:flex;justify-content:space-between;gap:12px;align-items:center;margin:12px 0}.cr-actions{display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end}.cr-actions button{touch-action:none;user-select:none}#cr-stick{flex-shrink:0;width:100px;height:100px;border-radius:50%;border:2px solid var(--line);position:relative;touch-action:none;text-align:center;color:var(--ink2);font-size:12px}#cr-stick i{position:absolute;left:29px;top:29px;width:40px;height:40px;background:var(--gold);border-radius:50%;pointer-events:none}#cr-goals{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));padding:0;gap:8px;list-style:none;font-size:14px}#cr-goals li{padding:8px;border:1px solid var(--line);border-radius:9px}#cr-breakdown{display:grid;grid-template-columns:1fr auto;max-width:400px}#cr-breakdown dd{margin:0}#cr-result{padding:24px}#cr-board li{padding:8px}#chicken-run [hidden]{display:none!important}@media(max-width:500px){#cr-canvas{height:43vh}.cr-actions{max-width:225px}.cr-actions button{font-size:13px!important;padding:8px!important}.cr-toolbar{gap:6px;font-size:13px}#cr-stick{width:85px;height:85px}#cr-stick i{left:22px;top:22px}}@media(max-height:500px) and (orientation:landscape){#cr-canvas{height:55vh;min-height:180px}#cr-stick{width:70px;height:70px}#cr-stick i{left:14px;top:14px}.cr-controls{margin:5px 0}}

#chicken-run,#chicken-run h1,#chicken-run h2,#chicken-run h3{font-family:var(--game);font-weight:400}#chicken-run h1,#chicken-run h2{font-weight:600}#cr-score{font-weight:600;font-size:1.15em;color:var(--gold)}

#cr-discovery{position:absolute;bottom:12px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:12px;width:max-content;max-width:calc(100% - 24px);padding:10px 14px;border-radius:20px;background:#fff5df;color:#423b2c;box-shadow:0 3px 16px #17251c33;pointer-events:none;box-sizing:border-box}
#cr-discovery-image{flex:0 0 64px;width:64px;height:64px;border-radius:14px;background-color:#fffaf0;background-size:600% 600%;background-repeat:no-repeat}
#cr-discovery strong{display:block;font-size:18px;line-height:1.2;margin-bottom:4px}#cr-discovery-line{display:block;font-size:14px;line-height:1.3}
@media(max-width:500px){#cr-discovery{gap:9px;padding:9px 11px;bottom:10px;max-width:calc(100% - 20px)}#cr-discovery-image{flex-basis:52px;width:52px;height:52px}#cr-discovery strong{font-size:16px}#cr-discovery-line{font-size:13px}}

#cr-egg-notice{display:flex;align-items:center;gap:12px;padding:10px 16px;margin:10px 0;background:#fff1cf;color:#51412a;border:2px solid #d3a854;border-radius:16px}#cr-egg-notice .cr-egg-icon{font-size:28px;animation:cr-egg-wiggle 1.4s ease-in-out infinite}#cr-egg-label.cr-egg-ready{color:var(--gold);font-weight:600}#chicken-run.cr-is-paused .cr-egg-icon{animation-play-state:paused}@keyframes cr-egg-wiggle{0%,100%{transform:translateY(0) rotate(-8deg)}50%{transform:translateY(-5px) rotate(8deg)}}@media(prefers-reduced-motion:reduce){#cr-egg-notice .cr-egg-icon{animation:none}}

#cr-cast{border:0;padding:0;margin:0;min-width:0}#cr-cast legend{margin-bottom:12px}.cr-cast-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px}.cr-cast-card{position:relative;display:flex;flex-direction:column;gap:8px;padding:10px;border:2px solid var(--line);border-radius:16px;background:var(--surface);cursor:pointer;min-width:0;overflow-wrap:anywhere}.cr-cast-card:has(input:checked){border-color:var(--gold)}.cr-cast-card:has(input:focus-visible){outline:3px solid var(--gold);outline-offset:3px}.cr-cast-card input{position:absolute;width:1px;height:1px;opacity:0}.cr-portrait{position:relative;display:block;aspect-ratio:1;overflow:hidden;border-radius:10px;background:var(--page)}.cr-photo-placeholder{position:absolute;inset:0;display:grid;place-items:center;font-size:3rem;color:var(--gold)}.cr-portrait img{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:cover}.cr-selected{position:absolute;right:6px;bottom:6px;border-radius:50%;width:28px;height:28px;background:var(--gold);color:var(--page);display:none;place-items:center;font-weight:600}.cr-cast-card:has(input:checked) .cr-selected{display:grid}.cr-personality{font-size:.9rem;color:var(--ink2)}.cr-modes{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-top:20px}.cr-mode{display:flex;flex-direction:column;align-items:flex-start;border:1px solid var(--line);border-radius:16px;padding:16px;min-width:0}.cr-mode h3{margin:0}.cr-mode button{margin-top:auto}@media(max-width:700px){.cr-cast-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.cr-modes{grid-template-columns:1fr}}@media(prefers-reduced-motion:no-preference){.cr-cast-card{transition:border-color .15s}}

/* Screen-reader announcements survive visual offscreen/expiry hiding. */
.cr-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
#cr-bubble{transform:none;max-width:min(280px,calc(100% - 12px));box-sizing:border-box;font-size:14px;padding:8px 12px}

/* Keep the world and both thumb controls together on short phone screens. */
@media(pointer:coarse), (max-width:700px){
 #cr-game{display:flex;flex-direction:column}
 #cr-stage{order:1;margin:5px 0}
 .cr-controls{order:2;margin:5px 0}
 #cr-game>.cr-toolbar{order:3}
 #cr-game>.cr-needs{order:4}
 #cr-egg-notice{order:4}#cr-goals,#cr-skip{order:5}
 #cr-canvas{height:clamp(150px,calc(100svh - 240px),450px);min-height:150px}
 .cr-actions button{min-width:44px;min-height:44px}
 [data-hold="64"]{order:-1}
}
#cr-launch{display:none}
#chicken-run.cr-launching>:not(#cr-launch){display:none}
#chicken-run.cr-launching #cr-launch{display:grid;justify-items:center;align-content:center;gap:14px;min-height:60vh;text-align:center}
#cr-launch img{width:min(80%,360px);height:auto}#cr-launch p{margin:0;font-size:1.2rem}
.cr-spinner{width:34px;height:34px;border-radius:50%;border:4px solid #f0c35a44;border-top-color:var(--gold);animation:cr-spin .9s linear infinite}
@keyframes cr-spin{to{transform:rotate(360deg)}}
@media(prefers-reduced-motion:reduce){.cr-spinner{animation:none}}

/* Keep gameplay compact beneath the shared site navigation. */
body:has(#chicken-run) .shell{max-width:none;padding:0}
body:has(#chicken-run) .content{max-width:1440px;padding:8px 12px;margin:0 auto}
#chicken-run{max-width:none}
.cr-brand{margin:8px 0 16px;text-align:center;line-height:0}
.cr-brand img{width:180px;max-width:60%;height:auto}
#chicken-run:has(#cr-game:not([hidden])) .cr-brand{display:none}
#cr-stage{margin:0 0 10px}
#cr-canvas{height:calc(100svh - 290px);min-height:180px;max-height:900px}
.cr-exit{margin:16px 0}
.cr-game-brand{display:block;width:150px;height:auto;margin:16px auto 0;order:6}
@media(pointer:coarse), (max-width:700px){
 #cr-stage{order:0;margin:0 0 6px}
 #cr-canvas{height:clamp(150px,calc(100svh - 310px),900px);min-height:150px}
 .cr-controls{order:1}
 #cr-game>.cr-toolbar{order:2}
 #cr-game>.cr-needs{order:3}
}

/* Keep Safari long presses on gameplay controls available for held input. */
#chicken-run .cr-actions button,#chicken-run .cr-actions button *,
#cr-stick,#cr-stick *{
 -webkit-user-select:none;user-select:none;-webkit-touch-callout:none;
}
#cr-stage,#cr-stage *{-webkit-user-select:none;user-select:none;-webkit-touch-callout:none}
