/* Hidey Hedge's own few parts over the play (the rest is our shared UI, @enjo/ui): the bubbles over the kids, the
   arrow toward a seeker out of sight, the red edges when the light comes close, the clock's last seconds. On
   brand.css's variables. */
.hns-bubble {
  position: fixed; left: 0; top: 0; pointer-events: none; z-index: 2;
  transition: opacity 160ms;
}
.hns-bubble > span {
  position: absolute; left: 0; bottom: 6px; transform: translateX(-50%);
  display: block; min-width: 30px; padding: 4px 10px 5px; border-radius: 999px; text-align: center;
  font: 700 17px/1.1 var(--enjo-font); color: #2a2622; white-space: nowrap;
  background: #fff; box-shadow: 0 3px 0 #d8c9c0;
  animation: hns-bubble-in 300ms cubic-bezier(.3, 1.7, .5, 1) both;
}
.hns-bubble > span::after {
  content: ""; position: absolute; left: 50%; bottom: -6px; margin-left: -6px;
  border: 6px solid transparent; border-bottom: 0; border-top-color: #fff;
}
.hns-bubble--alert > span {
  min-width: 34px; font-size: 24px; color: #fff; background: var(--enjo-primary, #f6623d);
  box-shadow: 0 3px 0 var(--enjo-primaryEdge, #b63613);
  animation: hns-bubble-in 300ms cubic-bezier(.3, 1.7, .5, 1) both, hns-bubble-throb 600ms 300ms ease-in-out infinite;
}
.hns-bubble--alert > span::after { border-top-color: var(--enjo-primary, #f6623d); }
.hns-bubble--lost > span { min-width: 34px; font-size: 24px; color: #fff; background: #9b6bf2; box-shadow: 0 3px 0 #6a3fc0; }
.hns-bubble--lost > span::after { border-top-color: #9b6bf2; }
.hns-bubble--help > span { font-size: 15px; animation: hns-bubble-in 300ms cubic-bezier(.3, 1.7, .5, 1) both, hns-bubble-wobble 1.2s 300ms ease-in-out infinite; }
.hns-bubble--you > span { font-size: 15px; color: #fff; background: #f2643f; box-shadow: 0 3px 0 #be3f22; }
.hns-bubble--you > span::after { border-top-color: #f2643f; }
.hns-bubble--out > span { animation: hns-bubble-out 200ms ease-in both; }
@keyframes hns-bubble-in { from { transform: translateX(-50%) scale(0.2); opacity: 0; } to { transform: translateX(-50%) scale(1); opacity: 1; } }
@keyframes hns-bubble-out { to { transform: translateX(-50%) scale(0.3); opacity: 0; } }
@keyframes hns-bubble-throb { 50% { transform: translateX(-50%) scale(1.15); } }
@keyframes hns-bubble-wobble { 25% { transform: translateX(-50%) rotate(-6deg); } 75% { transform: translateX(-50%) rotate(6deg); } }

/* the arrow at the screen's edge toward a seeker out of sight: a round coral badge with a white chevron */
.hns-arrow {
  position: fixed; left: -18px; top: -18px; width: 36px; height: 36px; pointer-events: none; opacity: 0;
  transition: opacity 200ms; z-index: 1;
}
.hns-arrow::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: var(--enjo-primary, #f6623d); box-shadow: 0 3px 0 var(--enjo-primaryEdge, #b63613);
}
.hns-arrow::after {
  content: ""; position: absolute; left: 13px; top: 11px; width: 10px; height: 10px;
  border-top: 4px solid #fff; border-right: 4px solid #fff; border-radius: 2px; transform: rotate(45deg);
}

/* peek's (the systems step's power-up): the same arrow in gold toward each hider out of sight */
.hns-arrow--peek::before { background: #ffbe2e; box-shadow: 0 3px 0 #d98200; }

/* the screen's edges warming red as a seeker's light comes close to the player */
.hns-danger {
  position: fixed; inset: 0; pointer-events: none; opacity: 0; z-index: 0;
  background: radial-gradient(ellipse at center, rgba(255, 60, 40, 0) 55%, rgba(255, 70, 40, 0.38) 100%);
}

/* the clock's last seconds */
.enjo-ui-tally__pill.hns-low { box-shadow: 0 0 0 2px #e8492a, 0 3px 0 2px #b8321a; }
.enjo-ui-tally__pill.hns-low .enjo-ui-tally__num { color: #e8492a; }

/* the card at the bottom while the player waits in a cage for a friend, with "Try again" */
.hns-caught {
  position: fixed; left: 50%; bottom: calc(var(--enjo-safe-bottom, 0px) + 22px); z-index: 3; pointer-events: auto;
  width: min(340px, calc(100vw - 32px)); transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 14px 16px 16px;
  border-radius: 22px; background: var(--enjo-surf, #fff); box-shadow: 0 5px 0 var(--enjo-surfSh, #d8c9c0);
  animation: hns-caught-in 340ms cubic-bezier(.3, 1.5, .5, 1) both;
}
.hns-caught__text { font: 600 18px/1.25 var(--enjo-font); color: var(--enjo-ink, #2a2622); text-align: center; text-wrap: pretty; }
.hns-caught__text em { font-style: normal; color: var(--enjo-primary, #f6623d); }
.hns-caught--out { animation: hns-caught-out 240ms ease-in both; pointer-events: none; }
@keyframes hns-caught-in { from { transform: translate(-50%, 140%); } to { transform: translate(-50%, 0); } }
@keyframes hns-caught-out { to { transform: translate(-50%, 140%); opacity: 0; } }

/* a crowd of seven hiders (the levels step's): the bar's counter a little tighter, so the board card keeps its
   caption beside a four-digit number */
.enjo-ui-bar__counter:has(> .enjo-ui-bar__slot:nth-child(7)) { gap: 1px; padding-left: 8px; padding-right: 8px; }
.enjo-ui-bar__counter:has(> .enjo-ui-bar__slot:nth-child(7)) > .enjo-ui-bar__slot { width: 26px; height: 26px; margin-top: 3px; }
@media (max-width: 389px) {
  .enjo-ui-bar__counter:has(> .enjo-ui-bar__slot:nth-child(7)) > .enjo-ui-bar__slot { width: 20px; height: 20px; margin-top: 2px; }
}

/* The systems step's (src/systems.js): the power-ups side by side in the bottom bar's left corner (the whole screen is
   the stick: the corner keeps them from under a thumb dragging in the middle), out of the way while the cage's card
   shows or the round is over; an outfit's picture (src/skins.js) in a chest's card a little bigger than its icons. */
.hns-powers { display: flex; gap: 24px; align-items: flex-end; transition: opacity 200ms, transform 200ms; }
.hns-powers.is-away { opacity: 0; transform: translateY(24px); pointer-events: none; }
.enjo-ui-chest__look img.skin-preview { width: 64px; }
/* the same crowd beside the coin card (the systems step's) from 390 to 479px: a little smaller still, so the board
   card keeps its caption ("Board") beside a four-digit number */
@media (min-width: 390px) and (max-width: 479px) {
  .enjo-ui-bar.has-coins .enjo-ui-bar__counter:has(> .enjo-ui-bar__slot:nth-child(7)) > .enjo-ui-bar__slot { width: 22px; height: 22px; margin-top: 2px; }
}
/* The settings step's: the gear at the bar's right end takes 60px more of the row, so the hiders' counter gives way
   when the row is short (a crowd of six or seven, a narrow phone): its people overlap, each drawn whole over the next,
   never the board card's number, the coins or the gear; the board card keeps its number and its caption ("Board"; a
   longer one ends in "…" past 76px); every card 50px high. */
.enjo-ui-bar.has-coins .enjo-ui-bar__stat { flex: none; }
.enjo-ui-bar.has-coins .enjo-ui-bar__label { max-width: 76px; }
.enjo-ui-bar.has-coins .enjo-ui-bar__counter {
  flex: 0 1 auto; min-width: 0; height: 50px; box-sizing: border-box; padding-block: 0; align-items: center;
}
.enjo-ui-bar.has-coins .enjo-ui-bar__slot { flex: 0 1 auto; min-width: 9px; margin-top: 0; }
.enjo-ui-bar.has-coins .enjo-ui-bar__slot:last-child { flex: none; }
.enjo-ui-bar.has-coins .enjo-ui-bar__slot img { inset: 0; inset-inline-end: auto; width: auto; height: 100%; aspect-ratio: 1; }
/* The review's (2026-11-12): the bubbles over the kids (z-index 2) and the edge arrows (1) under the shared UI's parts
   over the play: the bars, the coach's card and hand, the pops. At 320px the "You" over the player, drawn big while
   the seeker counts, covered the lesson's words ("Very [You] board!"). The dialogs (10) stay over everything. */
.enjo-ui-bar, .enjo-ui-tally, .enjo-ui-actions, .enjo-ui-coach, .enjo-ui-pop { z-index: 3; }
/* The review's (2026-11-12), Orchard Jar's way: on a short phone the dialogs' badges stay under the status inset.
   A boss's chest (its coins, a power-up and the outfit, "Camuflaje") wrapped its items on two rows under 360px in
   Spanish, French, Portuguese, Russian and Indonesian (the badge at -2 at 320 x 568): its items a little narrower. The
   outfits' grid cap (@enjo/ui's, the screen's height less 340px) less the status inset twice too (the badge sat at 12
   in the 20px inset in every language). Taller screens keep @enjo/ui's sizes. */
@media (max-width: 359px) {
  .enjo-ui-chest { gap: 6px; }
  .enjo-ui-chest__item { min-width: 68px; padding-inline: 6px; }
}
.enjo-ui-skins__grid { max-height: min(48vh, 440px, calc(100vh - 340px - 2 * var(--enjo-safe-top))); }
