/* Hako-Med Ball-Update 1.1.0 — deliberately scoped to the extra overlay. */
#hakomed-ball-update {
  --hmb-bottom: max(84px, calc(env(safe-area-inset-bottom, 0px) + 24px));
  --hmb-right: max(24px, env(safe-area-inset-right, 0px));
  --hmb-ball-size: 88px;
  position: fixed;
  inset: 0;
  z-index: 9900;
  pointer-events: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #253d2a;
  line-height: 1.5;
  text-align: left;
}
#hakomed-ball-update *, #hakomed-ball-update *::before, #hakomed-ball-update *::after { box-sizing: border-box; }
#hakomed-ball-update [hidden] { display: none !important; }
#hakomed-ball-update .hmb-stage { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
#hakomed-ball-update .hmb-dog {
  position: absolute;
  left: 0;
  top: 0;
  background-size: 400% 200%;
  background-repeat: no-repeat;
  will-change: transform;
  pointer-events: none;
}
#hakomed-ball-update .hmb-horse {
  position: absolute;
  left: 0;
  top: 0;
  background-size: 400% 200%;
  background-repeat: no-repeat;
  will-change: transform;
  pointer-events: none;
  z-index: 0;
}
#hakomed-ball-update .hmb-ball {
  all: unset;
  box-sizing: border-box;
  position: absolute;
  left: 0;
  top: 0;
  width: var(--hmb-ball-size);
  height: var(--hmb-ball-size);
  border-radius: 50%;
  display: grid;
  place-items: center;
  transform-origin: 50% 50%;
  isolation: isolate;
  z-index: 2;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  pointer-events: none;
  cursor: default;
  color: #23360c;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  box-shadow: 0 2px 3px #263a1818;
}
#hakomed-ball-update .hmb-ball svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
#hakomed-ball-update .hmb-ball-label {
  position: relative;
  z-index: 1;
  max-width: 76%;
  font-size: 15px;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
  overflow-wrap: anywhere;
  text-shadow: 0 1px 0 #fff6;
  opacity: 0;
}
#hakomed-ball-update[data-stage="ready"] .hmb-ball {
  left: auto;
  top: auto;
  right: var(--hmb-right);
  bottom: var(--hmb-bottom);
  width: var(--hmb-ball-size);
  height: var(--hmb-ball-size);
  transform: none !important;
  pointer-events: auto;
  cursor: pointer;
  box-shadow: 0 9px 11px -7px #20350b88, 0 2px 3px #263a1833;
}
#hakomed-ball-update[data-stage="ready"] .hmb-ball-label { opacity: 1; }
#hakomed-ball-update .hmb-ball:focus-visible { outline: 3px solid #17679c; outline-offset: 6px; }
#hakomed-ball-update[data-stage="ready"] .hmb-ball:hover { filter: brightness(1.05); }
#hakomed-ball-update .hmb-panel {
  position: absolute;
  right: var(--hmb-right);
  bottom: calc(var(--hmb-bottom) + var(--hmb-ball-size) + 18px);
  width: min(360px, calc(100% - 32px));
  max-height: calc(100dvh - var(--hmb-bottom) - var(--hmb-ball-size) - 34px);
  overflow: auto;
  overscroll-behavior: contain;
  padding: 25px 25px 24px;
  border: 1px solid #d7dfc6;
  border-radius: 18px;
  background: #fffef5;
  color: #253d2a;
  box-shadow: 0 16px 55px #1b321c26, 0 3px 8px #1b321c12;
  pointer-events: auto;
}
#hakomed-ball-update .hmb-kicker { margin: 0 30px 8px 0; font-size: 11px; font-weight: 700; letter-spacing: .11em; text-transform: uppercase; color: #6a7e4e; }
#hakomed-ball-update .hmb-title { margin: 0 25px 12px 0; font: 650 24px/1.2 Georgia, "Times New Roman", serif; color: #253d2a; overflow-wrap: anywhere; }
#hakomed-ball-update .hmb-message { margin: 0; font-size: 15px; line-height: 1.65; color: #40543a; white-space: pre-line; overflow-wrap: anywhere; }
#hakomed-ball-update .hmb-link { display: inline-block; margin-top: 18px; padding: 10px 16px; border-radius: 7px; background: #345b38; color: #fff; text-decoration: none; font-size: 14px; font-weight: 600; }
#hakomed-ball-update .hmb-link:hover { background: #24482b; color: #fff; }
#hakomed-ball-update .hmb-close {
  all: unset;
  box-sizing: border-box;
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  cursor: pointer;
  color: #3e5839;
  background: #edf1e2;
}
#hakomed-ball-update .hmb-close svg { width: 16px; height: 16px; }
#hakomed-ball-update .hmb-close:hover { background: #e1e9d2; }
#hakomed-ball-update .hmb-close:focus-visible, #hakomed-ball-update .hmb-link:focus-visible { outline: 3px solid #17679c; outline-offset: 3px; }
@media (max-width: 600px) {
  #hakomed-ball-update { --hmb-right: max(16px, env(safe-area-inset-right, 0px)); --hmb-ball-size: 78px; }
  #hakomed-ball-update .hmb-panel { padding: 23px 22px; }
  #hakomed-ball-update .hmb-title { font-size: 23px; }
}
@media (prefers-reduced-motion: reduce) {
  #hakomed-ball-update .hmb-dog, #hakomed-ball-update .hmb-horse { display: none !important; }
}
