/* Sloppy Joe (joe.js; desktop skill, "Sloppy Joe"). He is a drawing with his own colours (the brand's), like the game
   covers, so he looks the same in every skin; his bubble and his window wear the skin's tokens. He stands above the
   windows and under the bar, the start menu, menus and toasts. Nothing here exists until he is summoned. */
.joe-layer { position: fixed; inset: 0; z-index: 4500; pointer-events: none; }
.joe-layer[hidden], .joe-layer.away { display: none; }
.joe { position: absolute; left: 0; top: 0; width: 76px; height: 86px; padding: 0; border: 0; border-radius: 40% 40% 30% 30%; background: none; cursor: grab; pointer-events: auto; touch-action: none; -webkit-tap-highlight-color: transparent; }
.joe:active, .joe-dragging .joe { cursor: grabbing; }
.joe:focus { outline: none; }
.joe:focus-visible { outline: 3px solid var(--sk-focus, #728600); outline-offset: 2px; }
/* a paper edge round him, so the ink line holds on a dark desk or a dark picture */
.joe-svg { display: block; width: 100%; height: 100%; overflow: visible; filter: drop-shadow(0 0 1px #f4f1e8) drop-shadow(0 1px 0 #f4f1e8); }

.joe-bubble { position: absolute; left: 0; top: 0; display: flex; align-items: flex-start; gap: 4px; max-width: min(320px, calc(100vw - 16px)); padding: 10px 6px 11px 14px; border: var(--sk-edge-width, 1px) var(--sk-edge-style, solid) var(--sk-edge, #171815); border-radius: var(--sk-radius, 10px); background: var(--sk-surface-image, none), var(--sk-surface, #f4f1e8); color: var(--sk-ink, #171815); font: 14px/1.4 var(--sk-font, Arial, Helvetica, sans-serif); box-shadow: var(--sk-shadow); pointer-events: auto; opacity: 1; transition: opacity .18s; }
.joe-bubble[data-on="false"] { opacity: 0; pointer-events: none; }
/* the tail, pointing at him (below the bubble, or above it when he is near the top and it hangs under him) */
.joe-bubble::after { content: ""; position: absolute; left: calc(var(--tail, 50%) - 8px); top: 100%; width: 14px; height: 10px; margin-top: calc(-1 * var(--sk-edge-width, 1px)); background: var(--sk-edge, #171815); clip-path: polygon(0 0, 100% 0, 30% 100%); }
.joe-bubble::before { content: ""; position: absolute; z-index: 1; left: calc(var(--tail, 50%) - 7px); top: 100%; width: 12px; height: 8px; margin-top: calc(-2 * var(--sk-edge-width, 1px)); background: var(--sk-surface, #f4f1e8); clip-path: polygon(0 0, 100% 0, 30% 100%); }
.joe-bubble.below::after { top: auto; bottom: 100%; margin: 0 0 calc(-1 * var(--sk-edge-width, 1px)); clip-path: polygon(30% 0, 100% 100%, 0 100%); }
.joe-bubble.below::before { top: auto; bottom: 100%; margin: 0 0 calc(-2 * var(--sk-edge-width, 1px)); clip-path: polygon(30% 0, 100% 100%, 0 100%); }
.joe-line { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.joe-link { color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.joe-link::after { content: " ↗"; font-weight: 400; }
.joe-hush { flex: none; width: 30px; height: 30px; margin: -5px 0 -4px; padding: 0; border: 0; border-radius: 50%; background: none; color: inherit; font: 20px/1 var(--sk-font, Arial, sans-serif); cursor: pointer; }
.joe-hush:hover { background: var(--sk-accent, #e3ff59); color: var(--sk-accent-ink, #171815); }
.joe-bubble :focus-visible { outline: 3px solid var(--sk-focus, #728600); outline-offset: 2px; }

/* the drip: it falls from the sauce down his side to whatever he stands on, flattens into a spot and dries. Crumbs fall
   off as he walks and bounce once. The brand's warm end: sauce orange-red, meat brown, ink edges. */
.joe-drop { position: absolute; width: 8px; height: 10px; border: 1.5px solid #171815; border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%; background: #e5562c; pointer-events: none; animation: joe-drip 8.6s cubic-bezier(.5, 0, 1, 1) forwards; }
@keyframes joe-drip {
  0% { transform: translateY(0); }
  3% { transform: translateY(calc(var(--fall) - 2px)) scale(1, 1); border-radius: 50% 50% 50% 50% / 40% 40% 60% 60%; }
  5% { transform: translateY(var(--fall)) scale(2.6, .5); border-radius: 50%; opacity: 1; }
  45% { transform: translateY(var(--fall)) scale(2.6, .5); border-radius: 50%; opacity: .95; background: #e5562c; }
  100% { transform: translateY(var(--fall)) scale(2.2, .4); border-radius: 50%; opacity: 0; background: #b8692e; }
}
.joe-crumb { position: absolute; width: 5px; height: 4px; border: 1px solid #171815; border-radius: 45% 55% 40% 60%; background: #8a4520; pointer-events: none; animation: joe-crumb 2.4s cubic-bezier(.4, 0, 1, 1) forwards; }
.joe-crumb.sauce { background: #e5562c; }
@keyframes joe-crumb {
  0% { transform: translate(0, 0) rotate(0); }
  28% { transform: translate(var(--drift), var(--fall)) rotate(160deg); }
  38% { transform: translate(calc(var(--drift) * 1.3), calc(var(--fall) - 5px)) rotate(220deg); }
  48% { transform: translate(calc(var(--drift) * 1.5), var(--fall)) rotate(260deg); opacity: 1; }
  100% { transform: translate(calc(var(--drift) * 1.5), var(--fall)) rotate(260deg); opacity: 0; }
}

/* on a phone he lives in the corner of the home screen: the apps keep room for him */
html.phone.joe-on .icons-wrap { padding-bottom: 160px; }

/* his window in the Tools folder */
.joe-panel { display: flex; flex-direction: column; gap: 14px; padding: 16px 18px 6px; }
.joe-head { display: flex; align-items: center; gap: 14px; }
.joe-pic { flex: none; width: 64px; height: 72px; }
.joe-still { width: 100%; height: 100%; overflow: visible; }
.joe-state { margin: 0; font: 400 20px/1.15 var(--sk-display, "Archivo Black", Arial, sans-serif); letter-spacing: -.4px; font-synthesis: none; }
.joe-asks { display: flex; flex-wrap: wrap; gap: 6px; }
.joe-asks .btn { min-height: 38px; padding: 4px 13px; font-size: 13px; }
.joe-set { margin: 0; padding: 0; border: 0; }
.joe-set legend { margin-bottom: 6px; padding: 0; font-weight: 700; font-size: 14px; }
.joe-radio { display: flex; align-items: center; gap: 8px; min-height: 36px; font-size: 14px; cursor: pointer; }
.joe-radio input { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--sk-ink); }
.joe-radio span { color: var(--sk-muted, var(--muted)); }
.joe-h { margin: 0; font-size: 14px; }
.joe-log { margin: -6px 0 0; padding: 0; list-style: none; font-size: 13px; }
.joe-log li { padding: 5px 0; border-bottom: 1px solid var(--line); }
.joe-log li.kit-empty { padding: 8px 0; text-align: left; }
.joe-log time { color: var(--sk-muted, var(--muted)); font-variant-numeric: tabular-nums; }
.joe-foot { margin: 0 -18px; }
.joe-about { margin: -6px 0 10px; }
.joe-about a { color: inherit; }

@media (forced-colors: active) {
  .joe-bubble { border: 1px solid CanvasText; }
  .joe-bubble::after { background: CanvasText; }
  .joe-bubble::before { background: Canvas; }
  .joe-svg { filter: none; }
}
@media (prefers-reduced-motion: reduce) {
  .joe-bubble { transition: none; }
  .joe-drop, .joe-crumb { display: none; }
}
