/* The crowd is a single movable, scaled paper illustration. */
/* The site's reduced-motion toggle sets a short universal transition. Camera
   and dialog dimensions must be committed together for the next pointer hit. */
dialog:has(.axie-hunt),dialog:has(.axie-hunt) * {transition-property:none!important}
#modal:has(.axie-hunt),dialog.hunt-practice {
  width:min(1520px,calc(100vw - 16px),calc(150dvh + 16px));
  max-width:none;max-height:calc(100dvh - 12px);
}
dialog.hunt-practice {
  box-sizing:border-box; max-height:calc(100dvh - 26px); overflow:auto; overscroll-behavior:contain;
  margin:auto; padding:clamp(10px,1.4vw,20px); background:#fbf3dc; color:#253e33;
  border:2px solid #315a4a; border-radius:18px; box-shadow:0 14px 65px #122d28a8;
}
dialog.hunt-practice::backdrop {background:#082720ba;backdrop-filter:blur(3px)}
.hunt-practice h2 {color:#1b4b3c;font:800 clamp(24px,3vw,34px)/1.05 var(--display,Georgia,serif);margin:0 40px 10px 0;letter-spacing:-.02em}
.hunt-close {position:absolute;inset:12px 12px auto auto;width:35px;height:35px;border:1px solid #b9ae88;border-radius:50%;background:#fff6dc;color:#315741;font:700 25px/1 sans-serif;cursor:pointer}
.axie-hunt {display:grid;grid-template-columns:minmax(0,1fr) auto;grid-template-areas:"brief brief" "place controls" "field field" "mark mark" "help help";gap:5px 8px;text-align:left;color:#284a3c;font-family:var(--body,inherit);width:100%;min-width:0}
.hunt-brief{grid-area:brief}.hunt-place{grid-area:place}.hunt-zoom{grid-area:controls}.hunt-stage{grid-area:field}.hunt-help{grid-area:help}.hunt-marked{grid-area:mark}
.hunt-brief {display:flex;align-items:center;gap:13px;padding:7px 12px;margin:4px 0 12px;background:#fbefd0;border:1px solid #d9c895;border-radius:9px}
.hunt-reference {flex:none;position:relative;width:67px;height:57px;display:grid;place-items:center;border-radius:5px;border:1px solid #c8be96;background:#fff8e6;box-shadow:0 2px 0 #344a3517;transform:rotate(-3deg)}
.hunt-reference img {width:92%;height:90%;object-fit:contain}
.hunt-brief strong {display:block;color:#294f3a;font-size:.94rem;line-height:1.2}
.hunt-brief p {margin:3px 0 0!important;color:#4e5140!important;font-size:clamp(12px,1.6vw,14px)!important;line-height:1.4!important}
.hunt-count,.hunt-level,.hunt-marked,.hunt-help summary {font-weight:700;color:#315741}
.hunt-place {display:flex;align-items:baseline;flex-wrap:wrap;column-gap:8px;line-height:1.14}
.hunt-place strong {font:700 clamp(15px,2.1vw,20px)/1.15 var(--display,Georgia,serif);color:#254938}
.hunt-count {white-space:nowrap;font-size:.75rem;color:#596856}
.hunt-zoom {display:flex;align-items:center;gap:3px}
.hunt-tool,.hunt-fit {box-sizing:border-box;min-width:34px;min-height:31px;display:inline-grid;place-items:center;padding:0 6px;border:1px solid #a7b49c;border-radius:6px;background:#fffdf2;color:#284e39;font:700 1.07rem/1.1 inherit;cursor:pointer}
.hunt-fit {margin-left:4px;font-size:.76rem}
.hunt-tool:disabled {opacity:.48;cursor:default}
.hunt-level {min-width:35px;text-align:center;font-variant-numeric:tabular-nums;font-size:.74rem}
.hunt-stage {
  position:relative;isolation:isolate;display:block;overflow:hidden;box-sizing:border-box;
  width:100%;aspect-ratio:3/2;border:2px solid #466452;border-radius:8px;
  background:#293f38;
  touch-action:none;user-select:none;-webkit-user-select:none;cursor:grab;
}
.hunt-stage.hunt-dragging {cursor:grabbing}
.hunt-stage:focus-visible,.hunt-tool:focus-visible,.hunt-fit:focus-visible,.hunt-close:focus-visible,.hunt-help>summary:focus-visible {outline:3px solid #b84d37;outline-offset:2px}
.hunt-world {
  position:absolute;top:0;left:0;transform-origin:0 0;isolation:isolate;
  /* Keep hit testing and the displayed map on the same frame when the site's
     reduced-motion rules override transition-duration for every element. */
  transition-property:none!important;
  background:#deeaeb;
}
.hunt-illustration {position:absolute;inset:0;display:block;width:100%;height:100%;max-width:none;pointer-events:none}
.hunt-piece {position:absolute;transform:translate(-50%,-50%);box-sizing:border-box;transition-property:none!important}
.hunt-piece::before {position:absolute;content:"";inset:76% 18% 5%;background:#465c7433;border-radius:50%;filter:blur(1.2px);pointer-events:none}
.hunt-piece img {display:block;width:100%;height:100%;object-fit:contain;transform:rotate(var(--turn)) scaleX(var(--face));pointer-events:none}
.hunt-sill img {clip-path:inset(0 0 24%)}.hunt-sill::before{display:none}
.hunt-piece.hunt-selected::after,.hunt-stage:focus-visible .hunt-piece.hunt-focused::before {position:absolute;inset:-4%;content:"";border-radius:47%;pointer-events:none}
.hunt-piece.hunt-selected::after {border:4px solid #ac3341;box-shadow:0 0 0 2px #fff6ce;transform:rotate(-9deg);animation:hunt-mark 220ms ease-out}
.hunt-stage:focus-visible .hunt-piece.hunt-focused::before {inset:-9%;border:3px dashed #193f54;background:transparent;filter:none}
@keyframes hunt-mark {from{opacity:.3;transform:scale(1.27) rotate(-16deg)}to{opacity:1;transform:scale(1) rotate(-9deg)}}
.hunt-marked {font-size:.78rem;line-height:1.35;margin:5px 0 3px}
.hunt-help {font-size:.75rem}
.hunt-help>summary {min-height:30px;line-height:30px;cursor:pointer;width:fit-content}
.hunt-help p {margin:2px 0 6px!important;font-size:.78rem!important;line-height:1.45!important}
.hunt-practice-actions {display:flex;align-items:center;justify-content:center;gap:10px}
.hunt-practice-actions button {min-height:40px}
.hunt-practice-notice:empty {display:none}
.hunt-practice-notice {text-align:center;margin:8px 0;color:#365c3c;font-weight:700}
#modal:has(.axie-hunt) .dialog-body {padding:13px 14px 12px}
#modal:has(.axie-hunt) h2 {font-size:clamp(21px,3.2vw,32px);line-height:1.12;margin:0 36px 11px;text-align:left}
#modal:has(.axie-hunt) .q-category {margin:1px 36px 4px;text-align:left}
#modal:has(.axie-hunt) .ev-actions,.hunt-practice-actions {margin:8px 0 0}
#modal:has(.axie-hunt) .ev-notice:empty {display:none}
@media(min-width:800px){
  .axie-hunt {grid-template-columns:minmax(148px,clamp(148px,14.4vw,218px)) minmax(0,1fr);grid-template-rows:auto auto auto auto auto 1fr;grid-template-areas:"place field" "brief field" "controls field" "mark field" "help field" ". field";gap:8px clamp(12px,1.5vw,21px)}
  .hunt-place {display:grid;align-items:start;gap:4px;padding-top:4px}
  .hunt-place strong{font-size:clamp(20px,2.3vw,33px);line-height:1}
  .hunt-brief {display:grid;justify-items:start;margin:0;padding:12px 10px;gap:10px}
  .hunt-reference {width:min(100%,104px);height:80px;justify-self:center}
  .hunt-zoom {flex-wrap:wrap;align-self:start}
  .hunt-stage {align-self:start}
  .hunt-fit {margin-left:0}
}
@media(max-width:799px){
  #modal:has(.axie-hunt),dialog.hunt-practice {width:calc(100vw - 4px);max-height:calc(100dvh - 6px);border-radius:13px}
  dialog.hunt-practice{padding:12px 4px 10px}
  #modal:has(.axie-hunt) .dialog-body {padding:12px 4px 10px}
  .hunt-practice h2 {padding-left:5px}
  .hunt-reference {width:54px;height:48px}.hunt-brief{gap:9px;padding:6px 7px;margin:0 0 2px}
  .hunt-tool,.hunt-fit {min-width:35px;min-height:37px}
  .hunt-expand{min-width:47px}
  .hunt-place {display:grid;align-content:center;gap:2px;padding-left:3px}
}
#modal:has(.hunt-map-open),dialog.hunt-practice:has(.hunt-map-open) {
  box-sizing:border-box;position:fixed;inset:0;margin:0;width:100vw;height:100dvh;max-height:none;max-width:none;padding:0;border:0;border-radius:0;background:#fbf3dc;
}
dialog:has(.hunt-map-open) .hunt-close,dialog:has(.hunt-map-open)>h2,
#modal:has(.hunt-map-open) #modal-close,#modal:has(.hunt-map-open) .q-category,#modal:has(.hunt-map-open) h2 {display:none}
dialog.hunt-practice:has(.hunt-map-open),#modal:has(.hunt-map-open) .dialog-body{display:flex;flex-direction:column;height:100dvh;padding:0 0 max(4px,env(safe-area-inset-bottom));overflow:hidden}
dialog.hunt-practice:has(.hunt-map-open)>div:has(>.axie-hunt),#modal:has(.hunt-map-open) #quest-hunt-game{flex:1;min-height:0}
dialog.hunt-practice:has(.hunt-map-open) .hunt-practice-actions,#modal:has(.hunt-map-open) .ev-actions{margin:0 0 3px}
.axie-hunt.hunt-map-open {display:grid;grid-template-columns:auto minmax(0,1fr) auto;grid-template-rows:minmax(0,1fr) auto;grid-template-areas:"field field field" "brief mark controls";gap:0;height:100%;background:#fbf3dc}
.hunt-map-open .hunt-stage {height:100%;width:100%;max-height:none;border:0;border-radius:0;aspect-ratio:auto}
.hunt-map-open .hunt-place,.hunt-map-open .hunt-help,.hunt-map-open .hunt-brief>div:last-child {display:none}
.hunt-map-open .hunt-brief{display:flex;align-self:center;margin:2px 0 2px 5px;padding:0;background:transparent;border:0}
.hunt-map-open .hunt-reference{width:42px;height:35px}
.hunt-map-open .hunt-zoom {min-height:49px;align-items:center;padding:3px 7px;flex-wrap:nowrap}
.hunt-map-open .hunt-marked{align-self:center;margin:3px 6px;font-size:.73rem;text-wrap:pretty}
@media(max-height:540px) and (orientation:landscape) {
  #modal:has(.axie-hunt),dialog.hunt-practice{width:min(100vw,calc(150dvh + 88px))}
  #modal:has(.hunt-map-open),dialog.hunt-practice:has(.hunt-map-open){width:100vw}
}
@media(prefers-reduced-motion:reduce){.hunt-piece.hunt-selected::after{animation:none}}
.motion-off .hunt-piece.hunt-selected::after{animation:none}
