/* Cloud Farm: screenprint on cream paper. Ink #1f2a44, paper #f4ead2, rain #2f6fb3, mustard #e5a52c, terracotta #d4572e. */
.game-header{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:.5rem max(1rem,env(safe-area-inset-right)) .5rem max(1rem,env(safe-area-inset-left));background:#1f2a44;color:#f4ead2}
.game-header a{color:#f4ead2;text-decoration:none;font-weight:800;min-height:44px;display:inline-flex;align-items:center}
.game-tag{font-size:.78rem;opacity:.8}
.cf-main{padding-left:env(safe-area-inset-left);padding-right:env(safe-area-inset-right);padding-bottom:env(safe-area-inset-bottom)}
.game-title{text-align:center;margin:0 0 .5rem}
.game-title h1{font-size:1.35rem;font-weight:900;letter-spacing:.02em}
.cf-stage{position:relative;margin:0 auto;width:364px;height:562px;border:3px solid #1f2a44;background:#cfe3e8;box-shadow:5px 5px 0 #8fb6d4;-webkit-user-select:none;user-select:none;-webkit-touch-callout:none;overflow:hidden}
#cf-canvas{display:block;width:100%;height:100%;touch-action:none;-webkit-tap-highlight-color:transparent;outline:none}
.cf-screen{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:10px;background:rgba(31,42,68,.4);overflow-y:auto;overscroll-behavior:contain}
.cf-screen[hidden]{display:none}
.cf-panel{width:100%;max-width:310px;max-height:100%;overflow-y:auto;padding:16px 14px;background:#f4ead2;border:3px solid #1f2a44;box-shadow:5px 5px 0 #8fb6d4;text-align:center;margin:auto}
.cf-kicker{font-size:.78rem;font-weight:800;letter-spacing:.08em;text-transform:uppercase;color:#d4572e}
.cf-big{font-size:1.7rem;line-height:1.1;font-weight:900;margin:.2rem 0 .5rem}
.cf-line{font-size:.9rem;line-height:1.35;margin:0 0 .7rem}
.cf-small{font-size:.74rem;line-height:1.35;margin-top:.6rem;opacity:.85}
.cf-btn{font:inherit;font-weight:800;min-height:48px;min-width:48px;padding:.5rem 1rem;border:3px solid #1f2a44;background:#f4ead2;color:#1f2a44;cursor:pointer;box-shadow:3px 3px 0 #1f2a44;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.cf-btn:active{transform:translate(2px,2px);box-shadow:1px 1px 0 #1f2a44}
.cf-btn:focus-visible,.cf-icon:focus-visible{outline:3px solid #e5a52c;outline-offset:2px}
.cf-btn:disabled{opacity:.45;cursor:default;box-shadow:none}
.cf-primary{display:block;width:100%;background:#d4572e;color:#f4ead2;font-size:1.1rem;min-height:56px}
.cf-row{display:flex;gap:10px;margin-top:12px}
.cf-row .cf-btn{flex:1;font-size:.85rem;padding:.4rem .5rem}
.cf-monsoon{display:block;width:100%;margin-top:12px;background:#cfe3e8}
.cf-stars{display:flex;justify-content:center;gap:6px;margin:.3rem 0}
.cf-ups{margin-top:12px;border-top:3px solid #1f2a44;padding-top:10px;text-align:left}
.cf-bank{font-weight:800;font-size:.85rem;margin-bottom:6px}
.cf-up{display:flex;align-items:center;gap:8px;padding:6px 0;border-bottom:1px dashed rgba(31,42,68,.4)}
.cf-up-info{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.cf-up-info strong{font-size:.9rem}
.cf-up-info span{font-size:.74rem;line-height:1.25}
.cf-pips{display:flex;gap:4px;margin-top:2px}
.cf-pips i{width:12px;height:12px;border:2px solid #1f2a44;background:#f4ead2;display:block}
.cf-pips i.on{background:#e5a52c}
.cf-buy{min-width:64px;padding:.3rem .5rem;font-size:.9rem}
.cf-controls{display:flex;align-items:center;justify-content:space-between;gap:10px;width:364px;max-width:100%;margin:10px auto 0}
.cf-icon{width:48px;height:48px;display:inline-flex;align-items:center;justify-content:center;border:3px solid #1f2a44;background:#f4ead2;box-shadow:3px 3px 0 #1f2a44;cursor:pointer;touch-action:manipulation;-webkit-tap-highlight-color:transparent}
.cf-icon:active{transform:translate(2px,2px);box-shadow:1px 1px 0 #1f2a44}
.cf-icon .cf-slash{display:none}
.cf-icon.off .cf-slash{display:block}
.cf-icon.off .cf-waves{opacity:.25}
.cf-keys{font-size:.74rem;opacity:.7;text-align:center}
.cf-sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.cf-how{max-width:358px;margin:18px auto 0;font-size:.88rem;line-height:1.5}
.cf-how h2{font-size:1rem;font-weight:900;margin-bottom:.4rem}
.cf-how p{margin-bottom:.6rem}
.cf-foot{text-align:center;font-size:.8rem;padding:1rem 1rem calc(1rem + env(safe-area-inset-bottom))}
.cf-foot a{color:inherit}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important;scroll-behavior:auto!important}}

.cf-star{position:relative;display:block;width:38px;height:38px;background:#1f2a44;clip-path:polygon(50% 0,62% 34%,98% 36%,69% 58%,80% 94%,50% 73%,20% 94%,31% 58%,2% 36%,38% 34%)}
.cf-star-in{position:absolute;inset:4px;background:#f4ead2;clip-path:polygon(50% 0,62% 34%,98% 36%,69% 58%,80% 94%,50% 73%,20% 94%,31% 58%,2% 36%,38% 34%)}
.cf-star-in.on{background:#e5a52c}

.cf-pick{display:flex;align-items:center;justify-content:center;gap:8px;margin:0 0 .6rem}
.cf-pickb{min-width:48px;font-size:1.1rem;padding:.2rem .5rem}
.cf-pickm{flex:1;font-weight:800;font-size:.85rem}

/* Full screen (shell immersive on iPhone, native on Android): board fills the stage, no scrolling, chrome hidden */
html.pip-immersive .game-wrap,html.pip-native .game-wrap:fullscreen,.game-wrap:fullscreen{overflow:hidden!important}
html.pip-native .game-wrap:fullscreen{padding-top:calc(var(--pip-dock-h,52px) + 8px + env(safe-area-inset-top,0px));padding-bottom:env(safe-area-inset-bottom,0px);background:#f4ead2}
html.pip-immersive .cf-how,html.pip-immersive .cf-keys,html.pip-immersive .game-title,html.pip-immersive .ad-well,html.pip-immersive .cf-foot,html.pip-immersive #similar-games,
html.pip-native .cf-how,html.pip-native .cf-keys,html.pip-native .game-title,html.pip-native .ad-well,html.pip-native .cf-foot,html.pip-native #similar-games{display:none!important}
html.pip-immersive .cf-main,html.pip-native .cf-main{display:flex;flex-direction:column;align-items:center;justify-content:center;height:100%;padding:0}
html.pip-immersive .cf-controls,html.pip-native .cf-controls{width:auto;gap:24px;justify-content:center;margin-top:6px}
@media (orientation:landscape){
html.pip-immersive .cf-main,html.pip-native .cf-main{flex-direction:row;gap:12px}
html.pip-immersive .cf-controls,html.pip-native .cf-controls{flex-direction:column;margin:0;gap:14px}
}
html.pip-immersive .cf-stage,html.pip-native .cf-stage{flex:none;margin:0}
html.pip-immersive .game-wrap,html.pip-native .game-wrap:fullscreen{padding-left:env(safe-area-inset-left,0px)!important;padding-right:env(safe-area-inset-right,0px)!important;padding-bottom:max(4px,env(safe-area-inset-bottom,0px))!important}
html.pip-immersive .cf-controls,html.pip-native .cf-controls{margin-top:4px}
@media (orientation:landscape){
html.pip-immersive .cf-main,html.pip-native .cf-main{gap:6px}
html.pip-immersive .cf-controls,html.pip-native .cf-controls{margin:0}
}
