body.patrol-game { background:#edf7fa; color:#37546b; }
body.patrol-game .site-header,body.patrol-game > footer { display:none; }
body.patrol-game #app { width:min(1100px,calc(100% - 28px)); max-width:1100px; padding:0; margin:0 auto; }
.pp-shell { min-height:100dvh; padding:8px 0 20px; }
.pp-shell * { box-sizing:border-box; }
.pp-shell h1,.pp-shell h2,.pp-shell h3,.pp-shell p { margin-top:0; letter-spacing:0; }
.pp-shell h2 { font-size:25px; line-height:1.25; margin-bottom:10px; }.pp-shell p { font-size:18px; line-height:1.4; }
.pp-shell h2:focus { outline:none; }
.pp-shell button,.pp-shell .button,.pp-shell summary { min-height:48px; border-radius:6px; font-size:17px; letter-spacing:0; }
.pp-shell button:focus-visible,.pp-shell a:focus-visible,.pp-shell input:focus-visible,.pp-shell summary:focus-visible { outline:4px solid #b88bd3; outline-offset:3px; }
.pp-shell .pp-primary { background:#4c92b2; color:white; border:2px solid #38768f; padding:11px 18px; font-weight:700; box-shadow:0 3px 0 #356b83; }.pp-shell .pp-primary:hover { background:#3f7f9d; }.pp-shell .secondary { color:#41647e; background:#fffefa; border:1px solid #abc6d4; padding:10px 14px; }
.pp-toolbar { display:grid; grid-template-columns:auto 1fr auto auto 48px auto; align-items:center; gap:8px; padding-bottom:10px; min-height:66px; }.pp-toolbar h1 { font-family:inherit; font-size:18px; line-height:1.2; margin:0 0 5px; }.pp-toolbar span { display:block; font-size:13px; line-height:1.3; }.pp-toolbar .text-button { color:#79384b; font-size:14px; padding:8px; white-space:nowrap; }.pp-toolbar > button { font-size:15px; padding:8px 12px!important; }.pp-motion { display:flex; align-items:center; gap:5px; font-size:13px; min-height:48px; }.pp-motion input { width:22px; height:22px; accent-color:#659eb1; }
.pp-cover { text-align:center; padding:14px 0 0; }.pp-cover h2 { font-size:29px; }.pp-cover p { max-width:750px; margin:12px auto; }.pp-cover-image { display:block; width:100%; height:auto; }.pp-cover .pp-cover-image { max-height:450px; object-fit:contain; margin:20px auto; }.card-art .pp-cover-image { height:100%; width:100%; object-fit:cover; }
.pp-map,.pp-lesson,.pp-mission-done,.pp-finish,.pp-city { text-align:center; }.pp-map h2 { margin:10px 0; }.pp-mission-grid { display:grid; grid-template-columns:1fr 1fr; gap:16px; width:min(900px,100%); margin:18px auto; }.pp-mission-card { position:relative; min-width:0; padding:0 0 12px; background:#fffefa; border:2px solid #aac8d0; box-shadow:0 3px 0 #c8dce2; border-radius:8px; text-align:left; display:flex; flex-direction:column; }.pp-mission-card:hover { border-color:#629caf; }.pp-mission-art { display:block; height:165px; width:100%; border-radius:5px 5px 0 0; background:#dbf2fc; }.pp-mission-title { display:block; font-size:21px; font-weight:700; margin:9px 16px 6px; color:#365a71; }.pp-mission-progress { font-size:15px; color:#6d8595; margin:0 16px; }.pp-mission-complete { border-color:#91bd9d; }.pp-mission-badge { position:absolute; top:12px; right:10px; padding:6px 9px; font-size:14px; color:#54816a; background:#f0f9d8; border:1px solid #b2c78f; border-radius:4px; }
.pp-lesson { max-width:860px; margin:12px auto; padding:20px; border:2px solid #b2cdd7; border-radius:8px; background:#fffefa; }.pp-lesson-pup { height:120px; margin-bottom:10px; }.pp-puppy { height:100%; width:100%; }.pp-lesson-steps { display:grid; gap:10px; margin:16px 0; }.pp-lesson-steps > div { padding:10px; border-bottom:3px solid #d1dbe9; }.pp-lesson-steps strong { display:block; font-size:27px; line-height:1.3; }.pp-lesson-steps span { display:block; font-size:17px; line-height:1.4; margin-top:6px; }
.pp-console { padding:13px 15px; background:#fffefa; border:2px solid #aecad8; border-top:6px solid #eccb73; border-radius:8px; }.pp-task-heading span { display:block; font-size:14px; color:#6e8697; margin-bottom:4px; }.pp-task-heading h2 { font-size:24px; margin:0 0 13px; }.pp-console-layout { display:grid; grid-template-columns:40% 1fr; gap:22px; align-items:start; }.pp-equation { font-size:38px; font-weight:800; color:#345e7b; line-height:1.2; margin:4px 0 12px; }.pp-feedback { display:flex; flex-direction:column; justify-content:center; min-height:132px; padding:10px 12px; background:#eef4fc; border:1px solid #c8d8e5; border-radius:5px; font-size:18px; line-height:1.4; margin-bottom:12px; }.pp-feedback strong { color:#7b7296; font-size:15px; margin-bottom:4px; }.pp-error { background:#fff2ed; color:#8a6156; border-color:#e7c9b8; }.pp-answer-form label { display:block; font-size:17px; font-weight:700; margin-bottom:6px; }.pp-answer-form > div { display:flex; gap:10px; }.pp-answer-form input { width:95px; min-width:70px; height:56px; text-align:center; font-size:30px; font-weight:700; color:#385f79; border:2px solid #a6c2d1; border-radius:5px; background:white; padding:4px 8px; }.pp-answer-form button { flex:1; }.pp-hint-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; min-height:48px; }.pp-hint-actions button { font-size:16px; }.pp-wait { min-height:56px; display:flex; align-items:center; color:#64907f; font-size:19px; font-weight:700; }
.pp-rescue-scene { position:relative; width:100%; height:clamp(260px,calc(100dvh - 290px),440px); border:2px solid #adcbd3; border-radius:6px; background:#d9f0fb; }.pp-scene-backdrop { width:100%; height:100%; position:absolute; inset:0; }.pp-scene-preview { height:300px; }.pp-scene-pup { position:absolute; width:19%; height:36%; left:1%; top:4%; z-index:2; }.pp-machine { position:absolute; width:34%; height:48%; left:1%; top:43%; }.pp-vehicle-art { display:block; height:100%; width:100%; }.pp-rescue-scene button { position:absolute; min-width:48px; min-height:48px; padding:0; background:transparent; border:0; border-radius:6px; color:#476a7e; }.pp-rescue-scene button:disabled { opacity:1; cursor:default; }.pp-source { width:13%; height:26%; max-width:115px; z-index:3; }.pp-source:disabled { pointer-events:none; }.pp-object-art { width:100%; height:100%; display:block; pointer-events:none; }.pp-rock { top:64%; }.rock-0 { left:42%; }.rock-1 { left:58%; }.pp-ready-object { outline:3px solid #f2d078!important; outline-offset:2px; background:#fff5ca55!important; cursor:pointer; touch-action:none; animation:pp-target 1.5s ease-in-out infinite alternate; }.pp-selected { outline-color:#c29ee2!important; background:#f3e5ff66!important; }.pp-in-flight { visibility:hidden; }.pp-dragging { z-index:10; cursor:grabbing; animation:none!important; }
.pp-truck-target { left:74%; top:40%; width:24%; height:47%; border:3px dashed #abbfa5!important; background:#f2f2cb66!important; display:flex; flex-direction:column; justify-content:end; align-items:center; }.pp-truck-label { font-size:16px; font-weight:700; padding:4px 7px; background:#ffffe4; border-radius:4px; }.pp-truck-bed { width:100%; height:60%; border:5px solid #bb986a; background:#e2c69d; display:flex; align-items:center; justify-content:center; }.pp-truck-bed .pp-object-art { width:45%; height:90%; }.pp-target-active { outline:4px solid #f2d078!important; outline-offset:2px; background:#fff6c477!important; animation:pp-target 1.4s ease-in-out infinite alternate; }.pp-ready-object:hover,.pp-target:not(:disabled):hover { filter:brightness(1.04); }
.pp-road-bus { position:absolute; width:21%; height:23%; left:5%; top:72%; animation:pp-bus 5s linear infinite; }.pp-road-bus svg { height:100%; width:100%; }.phase-operating .pp-crane-arm { transform-origin:148px 137px; animation:pp-crane 1.7s ease-in-out; }
.pp-clean-zone { width:23%; height:31%; top:58%; }.clean-0 { left:42%; }.clean-1 { left:69%; }.pp-clean-paving,.pp-dirt { position:absolute; inset:3px; border-radius:5px; }.pp-clean-paving { background:repeating-linear-gradient(90deg,#ebc8ba 0 29px,#f5e6ce 29px 32px); border:3px solid #c7b7a1; }.pp-dirt { background:#ab9275; border:3px solid #937f6b; clip-path:polygon(3% 20%,18% 5%,41% 14%,58% 1%,88% 11%,99% 31%,90% 61%,99% 89%,70% 96%,47% 87%,20% 99%,1% 73%); transition:opacity .12s; }.pp-water { width:72px; height:70px; position:absolute; display:none; left:25%; top:15%; pointer-events:none; z-index:3; }.phase-operating.scene-park .pp-ready-object .pp-water { display:block; }.phase-operating.scene-park .pp-clean-zone:not(:disabled) .pp-dirt { animation:pp-wash 1.2s linear both; }.phase-operating.scene-park .pp-water { display:block; animation:pp-water 1.2s ease-in-out; }.phase-operating.scene-park .pp-dirt { animation:pp-wash 1.2s linear both; }.pp-residents { position:absolute; left:50%; top:49%; width:38%; height:39%; }.pp-residents svg,.pp-river-residents svg { width:100%; height:100%; }
.pp-helicopter { position:absolute; left:var(--pickup-left); top:5%; width:34%; height:48%; }.phase-action .pp-rotor,.phase-operating .pp-rotor { transform-origin:160px 38px; animation:pp-rotor .17s linear infinite; }.phase-operating .pp-helicopter { animation:pp-heli-flight 2.2s ease-in-out both; }.pp-basket { top:64%; }.basket-0 { left:12%; }.basket-1 { left:30%; }.pp-delivery-target { width:25%; height:29%; left:71%; top:63%; border:3px dashed #91b49a!important; background:#d9edbd88!important; display:flex; flex-direction:column; justify-content:end; align-items:center; }.pp-delivery-target > span { background:#faffdf; font-size:15px; padding:3px 6px; border-radius:4px; }.pp-delivered-baskets { display:flex; width:100%; height:70%; justify-content:center; }.pp-delivered-baskets .pp-object-art { width:45%; }.pp-river-residents { position:absolute; width:24%; height:29%; left:72%; top:31%; }
.pp-police-machine { width:34%; height:42%; top:43%; }.pp-cones { left:10%; top:64%; }.pp-sign { left:15%; top:19%; }.pp-placed-cones { position:absolute; left:43%; top:64%; width:13%; height:26%; }.pp-placed-sign { position:absolute; left:66%; top:43%; width:13%; height:26%; }.pp-cone-target { left:42%; top:63%; width:22%; height:28%; border:3px dashed #d7c185!important; background:#fff4ca55!important; }.pp-sign-target { left:65%; top:42%; width:20%; height:29%; border:3px dashed #d7c185!important; background:#fff4ca55!important; }.pp-cone-target span,.pp-sign-target span { display:block; font-size:15px; padding:5px; background:#fff9dc; border-radius:4px; }.scene-detour:not(.pp-restored) .pp-detour-route { opacity:.2; }.pp-detour-car { position:absolute; width:20%; height:26%; left:13%; top:59%; animation:pp-detour-drive 6s ease-in-out infinite; }
.pp-flying { position:absolute; width:13%; height:26%; max-width:115px; z-index:6; pointer-events:none; left:var(--source-left); top:var(--source-top); animation:pp-transfer 1.7s ease-in-out both; }.pp-flying.flying-cargo { animation:pp-cargo-transfer 2.2s ease-in-out both; }.pp-flying.flying-detour { animation-duration:1.2s; }
.pp-action-heading { padding:8px 0 3px; }.pp-unlocked { font-size:15px; color:#648573; display:block; margin-bottom:6px; }.pp-action-heading h2 { font-size:23px; margin-bottom:10px; min-height:30px; }.pp-action-feedback { min-height:45px; display:flex; align-items:center; font-size:17px; color:#627e91; padding:8px 0; }.pp-stamps { display:grid; grid-template-columns:repeat(8,1fr); width:min(520px,100%); gap:5px; margin:12px auto 0; }.pp-stamps > span { height:28px; display:grid; place-content:center; border:1px dashed #b8ccda; border-radius:4px; background:#fbfdff; color:#8ca4b6; font-size:14px; }.pp-stamps .pp-earned { border:1px solid #abc8a5; background:#e9f3c9; color:#7d9866; font-size:21px; }
.pp-mission-done .pp-primary { margin-top:14px; }.pp-mission-done .pp-rescue-scene { height:clamp(260px,calc(100dvh - 300px),400px); }.pp-mission-done h2 { margin:10px 0; color:#639477; }.pp-team { display:grid; grid-template-columns:repeat(4,1fr); max-width:650px; height:130px; margin:10px auto; gap:15px; }.pp-town { position:relative; width:min(900px,100%); height:255px; margin:14px auto; background:#d9f0fb; border-radius:6px; }.pp-town-art { width:100%; height:100%; display:block; }.pp-town-bus { width:15%; height:24%; position:absolute; top:64%; left:10%; animation:pp-bus 9s linear infinite; }.pp-town-bus svg { width:100%; height:100%; }.pp-team .pp-paw { transform-origin:50px 134px; animation:pp-wave 1.3s ease-in-out infinite alternate; }.pp-stats { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin:12px 0; }.pp-stats > div { padding:11px 13px; background:#fffefa; border:1px solid #b8cfd8; border-radius:6px; display:flex; align-items:center; gap:12px; text-align:left; }.pp-stats strong { font-size:32px; color:#5d8da3; }.pp-stats span { font-size:15px; line-height:1.3; }.pp-finish-actions { display:flex; flex-wrap:wrap; justify-content:center; gap:10px; margin:14px 0; }.pp-finish h2,.pp-city h2 { margin:10px 0; font-size:28px; }.pp-finish details { max-width:850px; text-align:left; margin:14px auto; }.pp-finish summary { padding:12px; cursor:pointer; }
.pp-help { width:min(610px,calc(100% - 24px)); max-height:calc(100dvh - 24px); overflow-y:auto; border:2px solid #a9c7d4; border-radius:8px; padding:24px; color:#37546b; background:#fffefa; }.pp-help::backdrop { background:#284b6b88; }.pp-paused *, .pp-paused *::before,.pp-paused *::after { animation:none!important; transition:none!important; }
@keyframes pp-target { to { box-shadow:0 0 0 4px #f9d98255; } }@keyframes pp-crane { 50% { transform:rotate(-12deg); } }@keyframes pp-bus { from { left:4%; }to { left:74%; } }@keyframes pp-rotor { 50% { transform:scaleX(.18); } }@keyframes pp-transfer { 0% { left:var(--source-left); top:var(--source-top); }40% { left:var(--source-left); top:25%; }75% { left:var(--target-left); top:25%; }100% { left:var(--target-left); top:var(--target-top); } }@keyframes pp-cargo-transfer { 0%,20% { left:var(--source-left); top:var(--source-top); }40% { left:var(--source-left); top:35%; }75% { left:var(--target-left); top:35%; }100% { left:var(--target-left); top:var(--target-top); } }@keyframes pp-heli-flight { 0% { left:var(--pickup-left); top:5%; }20% { left:var(--pickup-left); top:20%; }40% { left:var(--pickup-left); top:5%; }75% { left:62%; top:5%; }100% { left:62%; top:20%; } }@keyframes pp-wash { to { opacity:0; } }@keyframes pp-water { 0%,100% { left:10%; }50% { left:55%; } }@keyframes pp-detour-drive { 0% { left:8%; top:61%; }35% { left:39%; top:32%; }65% { left:65%; top:40%; }100% { left:77%; top:61%; } }@keyframes pp-wave { to { transform:rotate(15deg); } }
@media (min-width:901px) and (max-height:760px) { .pp-shell { padding-top:4px; }.pp-toolbar { min-height:60px; }.pp-console { padding:9px 13px; }.pp-scene-preview { height:280px; }.pp-feedback { min-height:126px; }.pp-town { height:220px; }.pp-team { height:110px; }.pp-rescue-scene.pp-interactive { height:calc(100dvh - 290px); } }
@media (max-width:1000px) { .pp-toolbar { grid-template-columns:auto 1fr auto 48px; }.pp-toolbar > div { grid-column:2 / 4; }.pp-toolbar [data-pp-action="map"] { grid-column:1; grid-row:2; }.pp-toolbar [data-pp-action="help"] { grid-column:2; grid-row:2; justify-self:end; }.pp-toolbar .pp-sound { grid-column:4; grid-row:1; }.pp-motion { grid-column:3 / 5; grid-row:2; justify-self:end; }.pp-console-layout { gap:14px; grid-template-columns:38% 1fr; }.pp-equation { font-size:34px; }.pp-scene-preview { height:300px; } }
@media (max-width:650px) { body.patrol-game #app { width:calc(100% - 14px); }.pp-toolbar { grid-template-columns:1fr auto 48px; gap:7px; }.pp-toolbar > div { grid-column:1 / -1; grid-row:1; }.pp-toolbar h1 { font-size:18px; }.pp-toolbar .text-button { grid-column:1; grid-row:2; }.pp-toolbar [data-pp-action="map"] { grid-column:2; grid-row:2; }.pp-toolbar .pp-sound { grid-column:3; grid-row:2; }.pp-toolbar [data-pp-action="help"] { grid-column:2 / 4; grid-row:3; justify-self:stretch; }.pp-motion { grid-column:1; grid-row:3; justify-self:start; min-height:30px; }.pp-toolbar span { font-size:12px; }.pp-shell h2 { font-size:23px; }.pp-shell p { font-size:17px; }.pp-console { padding:10px 8px; }.pp-console-layout { grid-template-columns:1fr; gap:12px; }.pp-scene-preview { height:190px; }.pp-equation { font-size:32px; }.pp-feedback { min-height:148px; font-size:17px; padding:9px; }.pp-answer-form input { width:75px; height:56px; }.pp-answer-form > div { gap:8px; }.pp-answer-form .pp-primary { font-size:16px; padding:9px; }.pp-hint-actions button { font-size:16px; }.pp-mission-grid { grid-template-columns:1fr; gap:12px; }.pp-mission-art { height:165px; }.pp-mission-title { font-size:21px; }.pp-map > p { margin-bottom:10px; }.pp-lesson { padding:13px; margin:8px auto; }.pp-lesson-pup { height:95px; }.pp-lesson-steps strong { font-size:24px; overflow-wrap:anywhere; }.pp-lesson-steps span { font-size:16px; }.pp-rescue-scene { height:300px; }.pp-rescue-scene.pp-scene-preview { height:190px; }.pp-action-heading h2 { font-size:21px; min-height:54px; }.pp-unlocked { font-size:14px; }.pp-action-feedback { min-height:65px; font-size:16px; }.pp-scene-pup { width:25%; height:35%; top:2%; }.pp-machine { width:37%; height:43%; left:0; top:45%; }.pp-helicopter { width:37%; height:43%; }.pp-truck-label,.pp-delivery-target > span,.pp-cone-target span,.pp-sign-target span { font-size:12px; padding:3px; }.pp-truck-bed { border-width:3px; }.pp-target { outline-width:3px!important; }.pp-ready-object { outline-width:2px!important; }.pp-source { height:24%; }.pp-road-bus { width:26%; height:22%; }.pp-mission-done .pp-rescue-scene { height:300px; }.pp-team { height:115px; gap:4px; }.pp-town { height:210px; }.pp-stats { grid-template-columns:1fr; gap:7px; }.pp-stats > div { padding:9px 12px; }.pp-finish-actions { flex-direction:column; }.pp-finish-actions > * { width:100%; }.pp-finish h2 { font-size:27px; }.pp-stamps { gap:4px; }.pp-flying { height:24%; }.pp-clean-zone { width:22%; } }
.pp-sign { left:30%; }
.phase-operating.scene-park .pp-dirt,.phase-operating.scene-park .pp-clean-zone:not(:disabled) .pp-dirt { animation:none; }
.phase-operating.scene-park .pp-water { display:none; animation:none; }
.phase-operating.scene-park[data-pp-part="0"] .clean-0 .pp-dirt,.phase-operating.scene-park[data-pp-part="1"] .clean-1 .pp-dirt { animation:pp-wash 1.2s linear both; }
.phase-operating.scene-park[data-pp-part="0"] .clean-0 .pp-water,.phase-operating.scene-park[data-pp-part="1"] .clean-1 .pp-water { display:block; animation:pp-water 1.2s ease-in-out; }
.scene-detour.pp-restored .pp-target { display:none; }
.pp-garden { position:absolute; left:51%; top:41%; width:33%; height:16%; pointer-events:none; }.pp-garden svg { width:100%; height:100%; }
.pp-restored .pp-garden { transform-origin:center bottom; animation:pp-bloom 1.8s ease-in-out infinite alternate; }.pp-restored .pp-fountain { stroke-dasharray:12 7; animation:pp-fountain .9s linear infinite; }
@keyframes pp-bloom { to { transform:scale(1.035); } }@keyframes pp-fountain { to { stroke-dashoffset:-19; } }
@media (prefers-reduced-motion:reduce) { .pp-shell *, .pp-shell *::before,.pp-shell *::after { animation:none!important; transition:none!important; } }

/* Scene depth is explicit; flight and traffic corridors stay clear of residents. */
.pp-rescue-scene { isolation:isolate; container-type:size; }
.pp-scene-backdrop { z-index:0; }
.pp-rescue-scene .pp-target,.pp-clean-zone { z-index:1; }
.pp-residents,.pp-river-residents { z-index:2; pointer-events:none; }
.pp-machine,.pp-scene-pup,.pp-garden { z-index:3; pointer-events:none; }
.pp-source,.pp-placed-cones,.pp-placed-sign { z-index:4; }
.pp-road-bus,.pp-detour-car { z-index:5; pointer-events:none; }
.pp-flying,.pp-airlift { z-index:6; pointer-events:none; }
.pp-rescue-scene .pp-dragging { z-index:10; }
.pp-truck-target { top:20%; height:40%; }
.pp-truck-bed { position:relative; border-bottom-width:10px; }
.scene-road.pp-restored .pp-road-machine,.pp-road-machine:has(~ .pp-road-bus) { top:27%; height:37%; }
.pp-residents { left:59%; top:22%; width:30%; height:30%; }
.pp-garden { top:45%; height:10%; }
.pp-airlift { --rig-width:min(34cqw,calc(48cqh * 310 / 210)); position:absolute; left:calc(var(--pickup-left) - var(--rig-width) * 109 / 310); top:calc(64% - var(--rig-width) * 201 / 310); width:var(--rig-width); height:calc(var(--rig-width) * 320 / 310); }
.pp-airlift > svg { display:block; width:100%; height:100%; }
.phase-operating .pp-airlift { animation:pp-airlift-flight 2.2s ease-in-out both; }
.scene-cargo .pp-scene-pup { left:1%; top:72%; width:10%; height:25%; }
.pp-river-residents { left:70%; top:73%; width:27%; height:25%; }
.pp-delivery-target { left:70%; top:46%; width:27%; height:25%; }
.pp-police-machine { left:0; top:32%; width:34%; height:32%; }
.pp-cones { top:70%; }
.pp-placed-sign { top:21%; height:24%; }
.pp-sign-target { top:20%; height:26%; }
@keyframes pp-airlift-flight {
  0%,20% { left:calc(var(--pickup-left) - var(--rig-width) * 109 / 310); top:calc(64% - var(--rig-width) * 201 / 310); }
  40% { left:calc(var(--pickup-left) - var(--rig-width) * 109 / 310); top:calc(4% - var(--rig-width) * 38 / 310); }
  75% { left:calc(72% - var(--rig-width) * 109 / 310); top:calc(4% - var(--rig-width) * 38 / 310); }
  100% { left:calc(72% - var(--rig-width) * 109 / 310); top:calc(46% - var(--rig-width) * 201 / 310); }
}
