/* Zoo Keeper Day. System fonts only. No inline styles. */
[hidden]{display:none!important}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}

body[data-game="zoo-keeper-day"]{
  background:#e8d4a8;
  color:#2a3a28;
  display:flex;flex-direction:column;
  position:fixed;inset:0;width:100%;height:100dvh;overflow:hidden;
  overscroll-behavior:none;touch-action:none;
}
body[data-game="zoo-keeper-day"] main{
  max-width:none;padding:0;
  display:flex;flex-direction:column;flex:1;min-height:0;
}
body[data-game="zoo-keeper-day"] .site-header,
body[data-game="zoo-keeper-day"] .site-footer{background:#f6f0e4;border-color:#c9b48a}

.caption{
  font-size:1.1rem;font-weight:800;text-align:center;min-height:1.4em;
  margin:6px 12px 4px;color:#2a3a28;
}

.screen{width:100%;display:flex;flex-direction:column;align-items:center;flex:1;min-height:0}
.row{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;margin:8px 10px 16px}
.lead{font-size:1.15rem;font-weight:700;margin:.15em 0 .5em;text-align:center;line-height:1.35}
.found-line{font-weight:800;margin:0 0 .6em;color:#5a4a32}

.hint{
  font-weight:800;text-align:center;color:#2a3a28;line-height:1.3;
  background:rgba(255,248,230,.96);
  border:3px solid #3a3224;border-radius:18px;
  padding:8px 16px;margin:8px auto;
  max-width:min(42rem, calc(100% - 24px));
  box-shadow:0 4px 0 #3a3224;
}

.btn{
  min-height:56px;padding:10px 22px;border-radius:18px;
  border:4px solid #3a3224;background:#fff8e8;color:#2a3a28;
  font:800 1.1rem system-ui,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
  box-shadow:0 5px 0 #3a3224;cursor:pointer;touch-action:manipulation;
}
.btn:hover,.btn:focus-visible{background:#fff}
.btn:active{transform:translateY(3px);box-shadow:0 2px 0 #3a3224}
.btn.primary{background:linear-gradient(#f0c14b,#e0a01a);color:#3a2614}
.btn.primary:hover,.btn.primary:focus-visible{background:linear-gradient(#ffe08a,#f0c14b)}
.btn.soft{background:#efe0c4}
button:focus-visible, .tool:focus-visible, .hab:focus-visible{
  outline:4px solid #111;outline-offset:3px;box-shadow:0 0 0 7px #ffe66d;
}

.hud{
  display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:8px 12px;
  width:min(960px, calc(100% - 16px));margin:6px auto 4px;
  position:sticky;top:0;z-index:12;
  background:rgba(246,240,228,.94);
  padding:6px 8px;border-radius:0 0 16px 16px;
}
.hud-title{margin:0;font-size:1.15rem;font-weight:900}
.pill{
  background:#fff8e8;border:3px solid #3a3224;border-radius:999px;
  padding:4px 14px;min-height:40px;display:inline-flex;align-items:center;
  font-weight:800;
}

.title{
  position:relative;
  min-height:calc(100dvh - 4.6rem);
  justify-content:flex-end;
  background:#e8d4a8 url("assets/title.jpg") center 42% / cover no-repeat;
  padding:0;
}
.title-panel{
  width:min(520px, calc(100% - 20px));
  margin:0 auto 16px;
  background:rgba(255,248,230,.94);
  border:4px solid #3a3224;border-radius:26px;
  box-shadow:0 8px 0 #3a3224, 0 18px 28px rgba(40,32,16,.28);
  padding:16px 16px 18px;text-align:center;
}
.title h1{
  margin:.05em 0 .15em;
  font-size:clamp(1.7rem, 6.4vw, 2.6rem);
  font-weight:900;letter-spacing:-.02em;color:#2a3a28;
  text-shadow:0 3px 0 #f0c14b;
}
.title-row{display:flex;gap:10px;justify-content:center;flex-wrap:wrap;margin-top:8px}

.map,.care,.fact{
  min-height:calc(100dvh - 4.4rem);
  justify-content:flex-start;
  padding-bottom:18px;
}
.map{background:#e8d4a8 url("assets/map.jpg") center / cover no-repeat;}
.care{background:#e8d4a8 url("assets/savanna.jpg") center / cover no-repeat;}
.care.bg-savanna{background-image:url("assets/savanna.jpg")}
.care.bg-ice{background-image:url("assets/ice.jpg")}
.care.bg-jungle{background-image:url("assets/jungle.jpg")}
.care.bg-farm{background-image:url("assets/farm.jpg")}
.fact{background:#e8d4a8 url("assets/map.jpg") center / cover no-repeat;}
.fact.bg-savanna{background-image:url("assets/savanna.jpg")}
.fact.bg-ice{background-image:url("assets/ice.jpg")}
.fact.bg-jungle{background-image:url("assets/jungle.jpg")}
.fact.bg-farm{background-image:url("assets/farm.jpg")}

.map-grid{
  width:min(900px, calc(100% - 16px));
  margin:4px auto;
  flex:1 1 auto;min-height:0;
  display:grid;grid-template-columns:1fr 1fr;grid-template-rows:1fr 1fr;
  gap:10px;
}
.zone{
  position:relative;overflow:hidden;
  border:4px solid #3a3224;border-radius:22px;
  box-shadow:0 5px 0 #3a3224;
  background:#d9c8a0 center / cover no-repeat;
  display:flex;flex-direction:column;min-height:0;
  padding:6px 8px 8px;
}
.zone.savanna{background-image:url("assets/savanna.jpg")}
.zone.ice{background-image:url("assets/ice.jpg")}
.zone.jungle{background-image:url("assets/jungle.jpg")}
.zone.farm{background-image:url("assets/farm.jpg")}
.zone h3{
  margin:0 auto 4px;font-size:.95rem;font-weight:900;
  background:rgba(255,248,230,.94);border:3px solid #3a3224;border-radius:999px;
  padding:2px 10px;color:#2a3a28;text-align:center;width:fit-content;
}
.slots{flex:1;display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:center;gap:4px;min-height:0}
.slot{width:30%;max-width:110px;text-align:center}
.slot img{width:100%;height:72px;object-fit:contain;filter:drop-shadow(0 3px 3px rgba(40,24,8,.25));background:transparent}
.slot .who{font-weight:900;font-size:.72rem;line-height:1.1;
  background:rgba(255,248,230,.92);border-radius:8px;padding:1px 4px;border:2px solid #3a3224}
.slot.empty .ghost{
  width:48px;height:48px;margin:8px auto 4px;
  border:3px dashed #3a3224;border-radius:50%;
  background:rgba(255,248,230,.78);
  box-shadow:0 2px 0 rgba(58,50,36,.25);
}

.care-wrap{
  width:min(720px, calc(100% - 16px));
  margin:0 auto;flex:1 1 auto;min-height:0;
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;
}
.care-pet{
  width:min(420px, 90%);
  flex:1 1 auto;min-height:140px;
  display:flex;align-items:flex-end;justify-content:center;
}
#carePet, #factPet{
  width:auto;height:100%;max-height:36vh;max-width:100%;object-fit:contain;
  filter:drop-shadow(0 12px 12px rgba(40,24,8,.22));
  border-radius:24px;
}
.care.step-count #carePet{max-height:26vh}
.care.step-count .care-pet{min-height:0;flex:0 1 auto}
.care.step-sort #carePet,.care.step-feed #carePet{max-height:32vh}
.care-tools,.food-row{
  width:100%;display:flex;flex-wrap:wrap;gap:10px;justify-content:center;
}
.hab, .tool{
  min-width:110px;min-height:88px;padding:8px 10px;border-radius:18px;
  border:4px solid #3a3224;background:#fffdf8;color:#2a3a28;
  font:800 .98rem system-ui,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
  box-shadow:0 4px 0 #3a3224;cursor:pointer;touch-action:manipulation;
  display:flex;flex-direction:column;align-items:center;justify-content:flex-end;gap:4px;
  background-size:cover;background-position:center;
}
.hab{width:min(42%, 200px);min-height:100px;color:#fff8e8;text-shadow:0 1px 0 #3a3224, 0 0 6px #3a3224}
.hab span, .hab b{
  background:rgba(255,248,230,.94);color:#2a3a28;text-shadow:none;
  border:2px solid #3a3224;border-radius:999px;padding:2px 8px;font-weight:900;
}
.hab.savanna{background-image:url("assets/savanna.jpg")}
.hab.ice{background-image:url("assets/ice.jpg")}
.hab.jungle{background-image:url("assets/jungle.jpg")}
.hab.farm{background-image:url("assets/farm.jpg")}
.tool img, .food img{height:64px;width:auto;max-width:110px;object-fit:contain;pointer-events:none;filter:drop-shadow(0 3px 4px rgba(40,24,8,.16))}
.tool:hover,.tool:focus-visible,.hab:hover,.hab:focus-visible{filter:brightness(1.05)}
.tool.right,.hab.right{outline:4px solid #1f5b34;background-color:#c8f5e1}
.tool.wrong,.hab.wrong,.btn.wrong{animation:wob .4s}
.hab.wrong,.tool.wrong{box-shadow:0 4px 0 #8a2020}

.count-box{display:flex;flex-direction:column;align-items:center;gap:6px;width:100%}
.count-bowl{
  position:relative;
  width:min(92%, 400px);
  max-height:28vh;
  background:transparent;border:none;box-shadow:none;padding:0;
}
.bowl-art{
  display:block;width:100%;height:auto;max-height:28vh;object-fit:contain;
  pointer-events:none;
  filter:drop-shadow(0 10px 10px rgba(40,24,8,.28));
}
.bowl-well{
  position:absolute;left:16%;right:16%;top:26%;bottom:36%;
  display:flex;align-items:flex-end;justify-content:center;gap:1%;
  pointer-events:none;
}
.bowl-well .bit{
  height:82%;width:auto;max-width:30%;object-fit:contain;
  transform-origin:50% 90%;
  filter:drop-shadow(0 3px 3px rgba(40,24,8,.28));
}
.bowl-well .bit.pop{animation:foodpop .42s cubic-bezier(.2,1.45,.35,1) both}
@keyframes foodpop{
  0%{transform:scale(.18) translateY(-30px);opacity:0}
  58%{transform:scale(1.16) translateY(2px);opacity:1}
  100%{transform:scale(1) translateY(0);opacity:1}
}
.count-num{
  position:absolute;left:50%;top:0;transform:translate(-50%,-28%);
  z-index:2;pointer-events:none;white-space:nowrap;margin:0;
  font-size:clamp(1.15rem, 4.4vw, 1.7rem);font-weight:900;
  background:rgba(255,248,230,.96);border:4px solid #3a3224;border-radius:18px;
  padding:3px 14px;box-shadow:0 4px 0 #3a3224;
}
#btnGive.give{
  min-width:min(88%, 240px);min-height:136px;padding:10px 18px 12px;gap:6px;
}
#btnGive.give img{height:108px;max-width:200px;width:auto;object-fit:contain}

.fact-stage{
  flex:1 1 auto;min-height:180px;width:min(520px, 92%);
  display:flex;align-items:flex-end;justify-content:center;
}
#factPet{max-height:42vh}
.hello{
  font-size:clamp(1.15rem, 4.4vw, 1.7rem);font-weight:900;text-align:center;
  color:#2a3a28;text-shadow:0 2px 0 #fff6d0;
  background:rgba(255,248,230,.94);border:4px solid #3a3224;border-radius:20px;
  padding:8px 16px;margin:8px 16px 0;box-shadow:0 5px 0 #3a3224;max-width:36rem;
}

@keyframes wob{0%,100%{transform:translateX(0)}25%{transform:translateX(-7px)}75%{transform:translateX(7px)}}
@media (prefers-reduced-motion:reduce){
  .tool.wrong,.hab.wrong,.btn.wrong{animation:none}
  .bowl-well .bit.pop{animation:none}
}

@media (max-width:799px){
  .title{min-height:calc(100dvh - 4.6rem);justify-content:flex-end;background-position:center 38%}
  .title-panel{margin-bottom:8px;padding:10px 10px 12px;border-radius:22px}
  .title h1{font-size:1.55rem}
  .lead{font-size:.98rem}
  .map .hint,.care .hint,.fact .hello{margin:8px 12px 6px}
  .map .row,.care .row,.fact .row{margin:8px 10px 18px}
  .map,.care,.fact{padding-bottom:20px}
  .btn{min-height:50px;padding:8px 16px}
  #carePet{max-height:26vh}
  #factPet{max-height:28vh}
  .slot img{height:56px}
  .zone h3{font-size:.8rem}
  .hab{min-height:84px;min-width:46%}
  .tool img{height:56px}
  .care.step-count #carePet{max-height:20vh}
  .count-bowl{width:min(94%, 300px);max-height:24vh}
  .bowl-art{max-height:24vh}
  #btnGive.give{min-width:min(90%, 220px);min-height:112px;padding:8px 14px 10px}
  #btnGive.give img{height:80px;max-width:160px}
  .count-num{font-size:1.2rem;padding:2px 12px;border-width:3px}
  .hello{font-size:1.05rem;margin:8px 12px 0;padding:6px 12px}
  body.g-map .caption, body.g-care .caption, body.g-fact .caption{display:none}
}
@media (min-width:800px){
  .title{justify-content:center;align-items:flex-end;min-height:calc(100dvh - 5.5rem);background-position:center 55%}
  .title-panel{margin:0 28px 32px auto}
  #carePet{max-height:36vh}
  .care.step-count #carePet{max-height:20vh}
  .count-bowl{width:min(70%, 360px);max-height:22vh}
  .bowl-art{max-height:22vh}
  #btnGive.give{min-width:220px;min-height:124px;padding:8px 16px 10px}
  #btnGive.give img{height:96px;max-width:200px}
  .care.step-count .hint{margin:6px auto;padding:6px 14px}
  .care.step-count .row{margin:6px 10px 12px}
  #factPet{max-height:46vh}
  .slot img{height:88px}
}

body.g-title .caption, body.g-title .site-footer{display:none}
body.g-map .caption, body.g-care .caption, body.g-fact .caption{display:none}
body.g-map .site-footer, body.g-care .site-footer, body.g-fact .site-footer{display:none}
