/* The details belong to the activity strip, which already sits above navigation.
   Anchor to its shell, not to a viewport inside a transformed desktop canvas. */
html.gom-compact #bottomBar .bottom-bar-shell { position: relative; }
html.gom-compact #bottomBar .compact-activity-panel {
  position: absolute !important;
  inset: auto 0 calc(100% + 4px) 0 !important;
  width: auto !important;
  min-width: 0;
  max-width: none;
  max-height: min(60dvh, calc(var(--compact-viewport-height, 100dvh) - 210px));
  margin: 0;
  padding: 8px 10px 10px;
  overflow: hidden !important;
  display: flex;
  flex-direction: column;
  gap: 7px;
  box-sizing: border-box;
  background: var(--mg-surface-window);
}
html.gom-compact .compact-activity-panel > .bottom-info-skill-heading {
  flex: 0 0 auto;
  min-height: 44px;
  padding: 0 0 5px;
  gap: 8px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
html.gom-compact .compact-activity-panel > .bottom-info-skill-heading > strong { flex: 1 1 auto; min-width: 0; font-size: 15px; line-height: 1.3; white-space: normal; overflow-wrap: anywhere; }
html.gom-compact .compact-activity-panel .bottom-info-scroll {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  padding: 0 2px 2px;
  scrollbar-gutter: auto;
}
html.gom-compact .compact-activity-panel .bottom-info-scroll > :not(.bottom-info-progress-stat) { grid-column: 1 / -1; }
html.gom-compact .compact-activity-panel .bottom-info-progress-stat { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; min-width: 0; gap: 4px; min-height: 46px; padding: 7px 8px; box-sizing: border-box; }
html.gom-compact .compact-activity-panel .bottom-info-stat-row { font-size: 12px; }
html.gom-compact .compact-activity-panel .bottom-info-stat-row strong { font-size: 14px; }
html.gom-compact .compact-activity-panel .bottom-info-activity-description { font-size: 13px; }
html.gom-compact #bottomBar .compact-activity-panel .end-activity-btn { min-height: 44px !important; width: 100%; margin: 0; }
html.gom-compact .compact-activity-panel .end-activity-hint { margin: 0; font-size: 11px; line-height: 1.35; }
html.gom-compact .compact-activity-minimize {
  display: inline-grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  padding: 8px;
  border: 1px solid var(--mg-mobile-control-border);
  border-radius: 7px;
  background: var(--mg-mobile-control-fill);
  color: var(--mg-text-main);
  box-shadow: none;
  touch-action: manipulation;
}
.compact-activity-minimize svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
html.gom-compact .compact-activity-minimize:focus-visible { outline: 2px solid var(--mg-mobile-control-accent); outline-offset: 2px; }
.compact-activity-minimize-flight {
  position: fixed;
  z-index: 30000;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  gap: 7px;
  padding: 8px 10px 10px;
  border: 1px solid var(--mg-mobile-control-accent);
  border-radius: 8px;
  background: var(--mg-surface-window);
  color: var(--mg-text-main);
  overflow: hidden;
  max-height: none !important;
  pointer-events: none !important;
  user-select: none;
  transform-origin: 0 0;
  will-change: transform, opacity;
}
@media (prefers-reduced-motion: reduce) {
  .compact-activity-minimize-flight { display: none; }
}
